IXlsEngine
COM interface ( getting help with interfaces )

 

interface IXlsEngine : IDispatch
{
  [id(1)]  HRESULT New([in]BSTR filename, [out, retval] IXlsWorkbook** workbook);
  [id(2)]  HRESULT Open([in]BSTR excelfilename, [in]BSTR newexcelfilename, [out, retval] IXlsWorkbook** workbook);
  [id(3)]  HRESULT GenerateCode([in]BSTR excelfilename, [in]BSTR txtfilename, [in]enumLanguage programminglanguage, [in]enumFormulaLanguage formulalanguage, [in]BOOL bUTF8Encoding, [in]BOOL bHtmlCells);
  [id(4)]  HRESULT Search([in]BSTR excelfilename, [out, retval] IXlsSearch** search);
  [id(5)]  HRESULT NewInMemory([in]IUnknown* lockbytes, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
  [id(6)]  HRESULT OpenInMemory([in]BSTR excelfilename, [in]IUnknown* lockbytes, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
  [id(10)] HRESULT OpenFromMemory([in]VARIANT inputBytearray, [in]VARIANT outputBytearrayOrFilename, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
  [id(11), propget] HRESULT Workbooks([out, retval] IXlsWorkbooks** workbooks);
  [id(12), propget] HRESULT ComponentVersion([out, retval]BSTR* versionInfo);
  [id(13), propget] HRESULT helpers([out, retval] IXlsHelpers** helpers);

}

 

HRESULT New([in]BSTR filename, [out, retval] IXlsWorkbook** workbook);
creates a new .xls/.xlsx file with the name (filename or filepath) passed in parameter, creates a new workbook to work with. Remember to create a new worksheet before you can work with cells. See IXlsWorkbook for more information.

 

HRESULT Open([in]BSTR excel_or_csv_filename, [in]BSTR newexcelfilename, [out, retval] IXlsWorkbook** workbook);
creates a new .xls/.xlsx file based on an existing Excel file or a CSV file. The first parameter is the filename or filepath of the existing Excel file excel_or_csv_filename. The second parameter is the filename or filepath of the new Excel file. For more information, see templates.

 

HRESULT GenerateCode([in]BSTR excelfilename, [in]BSTR txtfilename, [in]enumLanguage programminglanguage, [in]enumFormulaLanguage formulalanguage, [in]BOOL bUTF8Encoding, [in]BOOL bHtmlCells);
reverse engineers an Excel file, whose name is passed in the first parameter, and creates the resulting code in the file whose name is passed in the second parameter. The third parameter selects the programming language to write source code into. The fourth parameter selects the formula language. The fifth parameter is always ignored. The last parameter tells xlsgen whether you want the cell formatting expressed using an Html extended format, or using regular object method calls. For more information, see code generator.

 

HRESULT Search([in]BSTR excelfilename, [out, retval] IXlsSearch** search);
performs an accurate keyword search into an existing Excel workbook (support for Excel 95, 97, 2000, XP, 2003 and 2007 workbooks). Returns a IXlsSearch interface to set options, start the search and retrieve page results.

 

HRESULT NewInMemory([in]IUnknown* lockbytes, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
creates a new .xls/.xlsx IStorage stream in memory. See in-memory generation for more information. Note : this method can target Excel97, 2000, XP, 2003 and 2007 versions (with the 2007 version being a drastically different underlying file format).

 

HRESULT OpenInMemory([in]BSTR excel_or_csv_filename, [in]IUnknown* lockbytes, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
creates a new .xls/.xlsx IStorage stream in memory, based on the content of an existing Excel file or a CSV file. See in-memory generation for more information. Note : this method can target Excel97, 2000, XP, 2003 and 2007 versions (with the 2007 version being a drastically different underlying file format).

 

HRESULT OpenFromMemory([in]VARIANT inputBytearray, [in]VARIANT outputBytearrayOrFilename, [in]enumExcelTargetVersion version, [out, retval] IXlsWorkbook** workbook);
creates a new .xls/.xlsx file (or a buffer in memory) based on an existing Excel .xls/.xlsx buffer in memory.

 

HRESULT Workbooks([out, retval] IXlsWorkbooks** workbooks);
returns the workbooks collection.

 

HRESULT ComponentVersion([out, retval]BSTR* versionInfo);
returns the version of xlsgen.

 

HRESULT helpers([out, retval] IXlsHelpers** helpers);
returns helper functions.