Tuesday, 15 March 2011

spreadsheetgear - XLSB with SpreadsheetGear2012 - Excel cannot open the file 'test.xlsb' because the file format or file extension is not valid -



spreadsheetgear - XLSB with SpreadsheetGear2012 - Excel cannot open the file 'test.xlsb' because the file format or file extension is not valid -

i evaluating spreadsheetgear2012 , want able open/save types of excel files: .xls, .xlsx, .xlsm , .xlsb. extensions working fine except .xlsb.

here code creating 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 file on disk, has 3kb , if seek open manually error title. if create .xlsb file straight excel has 12 kb.

is missing here? maybe .xlsb file need set headers ?

i work here @ spreadsheetgear , think can clear air on of this: excel12 symbol should not alternative in spreadsheetgear.fileformat enum, not yet back upwards xlsb file format.

this symbol accidentally included in .net 2.0 build of spreadsheetgear 2012 .net (spreadsheetgear2012.dll). you'll notice (correctly) missing .net 4.0 build (spreadsheetgear2012.core.dll). given we've never implemented file format, attempting utilize excel12 alternative no uncertainty lead unexpected results.

furthermore, we'll removing alternative future builds of our product, you'll want ensure remove references it.

spreadsheetgear xlsb

No comments:

Post a Comment