Error Calling Idispatch Member Open Exception Thrown By Server
your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Welcome to Qt Centre. Qt Centre is a community site devoted to programming in C++ using the Qt framework. Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. + Reply to Thread Results 1 to 8 of 8 Thread: QAxBase exception signal Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 20th November 2013,16:50 #1 thomas@itest View Profile View Forum Posts View Blog Entries View Articles Novice Join Date Oct 2011 Posts 27 Thanked 3 Times in 3 Posts Qt products Platforms QAxBase exception signal Hi all, I'm using QAxBase objects (ms excel automation) and would like to connect the QAxBase::exception(int,QString,QString,QString) signal to manage errors but i can't ... So, i've opened "qaxbase.h" source code and found : Qt Code: Switch view #ifdef qdocQ_SIGNALS: void signal(const QString&,int,void*); void propertyChanged(const QString&); void exception(int,const QString&,const QString&,const QString&);#endif #ifdef qdoc Q_SIGNALS: void signal(const QString&,int,void*); void pro
download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). Home Qt Development General and Desktop QAxObject->dynamicCall() throws Type Mismatch (Solved) QAxObject->dynamicCall() throws Type Mismatch (Solved) This topic has been deleted. Only users with topic management privileges can see it. clinisbut last edited by Here is my example code (very simple) @activex = new QAxObject("832C30D8-7062-44AC-878E-0C7C64B245A8"); activex->setProperty("Settings", QString("9600,n,8,1") );@ Throws this (Description in spanish): @QAxBase: http://www.qtcentre.org/threads/56966-QAxBase-exception-signal Error calling IDispatch member Settings: Exception thrown by server Code : 13 Source : Comm32 Description: No coinciden los tipos (type mismatch) Help : Connect to the exception(int,QString,QString,QString) signal to catch this exception@ Using QAxBase::generateDocumentation() clearly says that : @QString Settings For more information, see help context 23 in C:\WINDOWS\system32\Comm32.chm. Read this property's https://forum.qt.io/topic/1034/qaxobject-dynamiccall-throws-type-mismatch-solved value using QObject::property: QString val = object->property("Settings").toString(); Set this property' value using QObject::setProperty: QString newValue = ... object->setProperty("Settings", newValue); Or using the SetSettings slot.@ .. which is exactly what I'm trying to do. Calling dynamicCall( "SetSettings(QString)", QString("9600,n,8,1") ); doesn't help too... I must add that using another control like MSComm32 I have no problems (related with Qt, MSComm32 has other more serious problems) If it helps, debugging into code I found that the exception is thrown when Qt tries to call Invoke() method of the IDispath class, inside @QAxBase::internalProperty@ At line 3553, file qaxbase.cpp. EDIT Ok I solved it. It happens that the COM control I was trying to use is visual, and I should use QAxWidget instead of QAxObject. So replacing QAxObject by QAxWidget in the code above makes everything work. Thank you anyway. Reply Quote 0 Loading More Posts 1 Posts 4432 Views Reply Reply as topic Log in to reply 1 / 1
13:13) QStringList list[cols]; ......... http://www.forum.crossplatform.ru/lofiversion/index.php/t2450-50.html for(int j = 1; j < cols+1; j++) http://www.forum.mista.ru/topic.php?id=673733 { ......... if(str.isEmpty()) list[j].append("Empty"); else list[j].append(str);Имхо криминал тут. Понятно почему? (нужно быть внимательнее с индексами) AlexeyDonald 22.2.2011, 1:56 Народ подскажите, цель поменять имя листа в документе, не пойму в чем ошибка. Вот проблема, я error calling экспортирую дату в excel, открываю документ, все нормально работает до определенного момента, код ниже:QAxObject* excel = new QAxObject( "Excel.Application" );
excel->dynamicCall( "SetVisible(bool)", TRUE );
QAxObject *workbooks = excel->querySubObject( "Workbooks()" );
QAxObject* workbook = workbooks->querySubObject( "Add()" );
QAxObject* Sheets = error calling idispatch workbook->querySubObject( "Sheets" );
QAxObject* Sheet;
Sheets->querySubObject("Add");
Sheets->querySubObject("Add");
Sheets->querySubObject("Add");
Sheet =Sheets->querySubObject( "Item(int)" ,1);
Sheet->dynamicCall( "Select()" );
Sheet->setProperty("Name","name1");
ExportToPage1(Sheet,model_1); После этого названия листа меняется нормально.Но дальше отказывается менять имя листа. Sheet =Sheets->querySubObject( "Item(int)" ,2);
Sheet->dynamicCall( "Select()" );
Sheet->dynamicCall("Name","name2");
ExportToPage2(Sheet,model_2);
Sheet =Sheets->querySubObject( "Item(int)" ,3);
Sheet->dynamicCall( "Select()" );
Sheet->setProperty("Name(QString)","name3");
ExportToPage2(Sheet,model_3);
Sheet = Sheets->querySubObject( "Item(int)" ,4);
Sheet->dynamicCall( "Select()" );
Sheet->setProperty("SetName(QString)","name4");
ExportToPage2(Sheet,model_4); пишет:QAxBase: Error calling IDispatch member Name: Exception thrown by server Code : 1004 Source : Microsoft Excel Description: ??????? ???????????? ??? ??? ????? ??? ?????????. ?????????, ???:? ????? ?????????? ????? ?? ????????? 31 ?????;? ??? ?? ???????? ?? ?????? ?? ????????? ??????: : \ / ? * [ ??? ];? ??? ?? ????????? ??????. Help : xlmain11.chm Connect to the exception(int,QString,QString,QString) si