Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71273

Qt Excel automation problem in Qt 5.11.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.11.1
    • ActiveX Support
    • None
    • Win7 64bit + VS2017+Qt 5.11.1 for VS2015 32bit binary library
    • Windows

    Description

      Failed to get the Workbook.Sheets() property.

      // code placeholder
      Excel::Workbook *pWorkbook = 0;
      Excel::Workbooks *pWorkbooks = excel.Workbooks();
      pWorkbook = pWorkbooks->Add();
      Excel::Sheets *pSheets = pWorkbook->Sheets();
      

       

      Access vialation error in function 'Sheets()' when executing last line. The same code work under Qt 5.11.0.

      The 'Sheets()' function is as below:

       

      // code placeholder
      inline Excel::Sheets* Workbook::Sheets() const
      {
          Excel::Sheets* qax_pointer = 0;
          qRegisterMetaType<Excel::Sheets*>("Sheets*", &qax_pointer);
          qRegisterMetaType<Excel::Sheets>("Sheets", qax_pointer);
          QVariant qax_result = property("Sheets");
          if (!qax_result.constData()) return 0;
          Q_ASSERT(qax_result.isValid());
          return *(Excel::Sheets**)qax_result.constData();
      }
      

       

      Attachments

        Activity

          People

            kleint Friedemann Kleint
            diverger Hua Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: