Generating embedded charts via Qt ActiveX
-
Ah so ("ChartObjects(int)",1)->querySubObject("Chart");
gives the first chart.
Good work.
Thank you for reporting back.wrote on 4 Nov 2016, 13:33 last edited by@mrjj But still having problem with adding new embedded chart!!!
-
@mrjj But still having problem with adding new embedded chart!!!
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* . -
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* .wrote on 4 Nov 2016, 14:01 last edited by alizadeh91 11 Apr 2016, 14:03@mrjj I've changed sheet2->querySubObject("ChartObjects"); to sheet2->querySubObject("ChartObjects()"); and it worked
-
Super :)
oh it must have "()" on.
The syntax is pretty funky via the automation server.
Good work.
21/24