i created a plugin for ms office,it's works fine on office 2019 Excel & wps office 2019 ET,but it has problems on ms office 2013.
here is the describe:
rst = disp->QueryInterface(__uuidof(Excel::_Worksheet), (void**)&sheet);
disp->Release();
Excel::Range* rawRange = nullptr;
Excel::IRange* rows = nullptr;
rst = sheet->get_Rows(&rawRange);
rst = rawRange ->QueryInterface( __uuidof(Excel::IRange), (void**)&rows);
the get_Rows works fine and returns S_OK,but Range::QueryInterface returns E_NOINTERFACE,that's strange! I can not understand, is there anything i missed?
there are many positions called the QueryInterface method, but only the Range type query the IRange type will fail.
Office 2019 & WPS 2010 works fine,already reinstalled office 2013, but still no work. Maybe a Microsoft bug?
as
@Joseph Willcoxsonsays, theRangetype did not implement theIRangeinterface but it implemented the features, we can useIDispatchinterfaceInvokemethod to do the same thing. and I'd like to share my utility code.we can use it in this way