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

Qt Excel automation problem in Qt 5.11.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.11.1
    • Fix Version/s: None
    • Component/s: ActiveX Support
    • Labels:
      None
    • Environment:
      Win7 64bit + VS2017+Qt 5.11.1 for VS2015 32bit binary library
    • Platform/s:
      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes