I have a MFC/C++ project that uses the ActiveX Document (Automation) approach for opening Excel Sheet embedded object. Unfortunately, Excel.Sheet obj API does not have methods to load data from a prepeared htm/cvs file. So, I can not load the prepared data. The only object capable of loading data from a file is “Workbooks” (method Open(…)), but it always creates a new Sheet object, and does not use existing one. All examples of use embedded Excel.Sheet document offer to fill a table cell “by hand” and no one shows how to open an existing file in it.
So, how to load html/cvs datafile to Automated Excel Sheet document ?
As it turned out, there is no way to create ActiveX Excel Sheet Document initialized by file format does not coincide with xls/xlsx. First you need to convert the html format in xls/xlsx and then open through standart OLE API (OleCreateFromFile).
A conversion I described in the link.