I am evaluating SpreadsheetGear2012 and I want to be able to open/save all types of Excel files: .xls, .xlsx, .xlsm and .xlsb. All extensions are working fine except for .xlsb.
Here is the code for creating a simple .xlsb file:
SpreadsheetGear.FileFormat excelFormat = SpreadsheetGear.FileFormat.Excel12;
SpreadsheetGear.IWorkbookSet workbookSet = SpreadsheetGear.Factory.GetWorkbookSet();
SpreadsheetGear.IWorkbook workbook = workbookSet.Workbooks.Add();
workbook.SaveAs(@"D:\test.xlsb", excelFormat);
workbookSet.Workbooks.Close();
This code creates the file on disk, but it has only 3KB and if I try to open it manually I get the error from the title. If I create an .xlsb file directly from Excel it has 12 KB.
Is it something that I am missing here? Maybe for .xlsb file I need to set up some headers ?