'Factory are not initialized' error

Jul 19, 2011 at 11:08 AM

 

Hi

Can anyone explain what on earth this error message means:

'Factory are not initialized with generated LateBindingApi assemblies.'

It happens every time I try to load an XLS/XLSX file into a workbook object:

	Program.obExcelA = new NetOffice.ExcelApi.Application();

	Program.obExcelA.Workbooks.Open(szFile);

Thanks

 

Nick Harmer

Coordinator
Jul 19, 2011 at 11:56 AM

You have to initialize the api with one call.

// Initialize Api COMObject Support
LateBindingApi.Core.Factory.Initialize();

 

regards
sebastian