Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Generating embedded charts via Qt ActiveX
Forum Updated to NodeBB v4.3 + New Features

Generating embedded charts via Qt ActiveX

Scheduled Pinned Locked Moved Solved General and Desktop
qaxobjectactivexexcelcharts
24 Posts 3 Posters 11.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M mrjj
    4 Nov 2016, 07:40

    Ah so ("ChartObjects(int)",1)->querySubObject("Chart");
    gives the first chart.
    Good work.
    Thank you for reporting back.

    A Offline
    A Offline
    alizadeh91
    wrote on 4 Nov 2016, 13:33 last edited by
    #21

    @mrjj But still having problem with adding new embedded chart!!!

    M 1 Reply Last reply 4 Nov 2016, 13:57
    0
    • A alizadeh91
      4 Nov 2016, 13:33

      @mrjj But still having problem with adding new embedded chart!!!

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 4 Nov 2016, 13:57 last edited by
      #22

      @alizadeh91

      Did you try the test code ?.

      It inserts embedded for me.

      QAxObject* test = workbook->querySubObject("ActiveSheet");
      QAxObject* charts = test->querySubObject("ChartObjects");
      QList<QVariant> f; f << 200 << 400 << 200 << 200;
      charts->dynamicCall("Add(int, int, int, int)", f );

      I didnt check if
      ("ChartObjects(int)",1)->querySubObject("Chart"); will give you that.

      From docs, the Add should return the chart object but I could not get it to cast to
      QAxObject* .

      A 1 Reply Last reply 4 Nov 2016, 14:01
      3
      • M mrjj
        4 Nov 2016, 13:57

        @alizadeh91

        Did you try the test code ?.

        It inserts embedded for me.

        QAxObject* test = workbook->querySubObject("ActiveSheet");
        QAxObject* charts = test->querySubObject("ChartObjects");
        QList<QVariant> f; f << 200 << 400 << 200 << 200;
        charts->dynamicCall("Add(int, int, int, int)", f );

        I didnt check if
        ("ChartObjects(int)",1)->querySubObject("Chart"); will give you that.

        From docs, the Add should return the chart object but I could not get it to cast to
        QAxObject* .

        A Offline
        A Offline
        alizadeh91
        wrote on 4 Nov 2016, 14:01 last edited by alizadeh91 11 Apr 2016, 14:03
        #23

        @mrjj I've changed sheet2->querySubObject("ChartObjects"); to sheet2->querySubObject("ChartObjects()"); and it worked

        1 Reply Last reply
        3
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 4 Nov 2016, 14:04 last edited by
          #24

          Super :)
          oh it must have "()" on.
          The syntax is pretty funky via the automation server.
          Good work.

          1 Reply Last reply
          2

          21/24

          4 Nov 2016, 13:33

          • Login

          • Login or register to search.
          21 out of 24
          • First post
            21/24
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved