When I try using Silverlight Excel engine to load excel documents, sometimes got the following error:
Not supported code pageParameter name: codePage at Infragistics.Silverlight.CodePageEncoding.GetEncoding(Int32 codePage) at Infragistics.Silverlight.Excel.SilverlightFixes.GetEncoding(Int32 codePage) at id.b(BinaryReader A_0, a A_1) at id.a(BinaryReader A_0, a A_1) at gq.a(BinaryReader A_0, a A_1) at id.c(BinaryReader A_0, a A_1) at id.b(Stream A_0) at Infragistics.Silverlight.Excel.DocumentProperties.b(ig A_0) at Infragistics.Silverlight.Excel.Workbook.a(Workbook A_0, Stream A_1, String A_2) at Infragistics.Silverlight.Excel.Workbook.a(Stream A_0, WorkbookFormat A_1, String A_2, IPackageFactory A_3, Boolean A_4) at Infragistics.Silverlight.Excel.Workbook.Load(Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Silverlight.Excel.Workbook.Load(Stream stream, IPackageFactory packageFactory) at Infragistics.Silverlight.Excel.Workbook.Load(Stream stream) at ExcelSL.MainPage.Button_Click(Object sender, RoutedEventArgs e)
I didn't found any information about code page in documentation. Which code page is supported now? And what can I do?
Hi gtachev,
glad to see the message and looking forward to see the new version.
regards,
treenode
Hi treenode,
I'm working on including cp936 support, also I'll add DMPAPER_USER and they will be included in next Service Release of the product.
Thanks,George
This document come from our users, and I have no control on document format they choose. I just want to allow users to import documents from web page, so support for codepage cp936 is needed.
I've seen the paper size issue also in the full .Net version of Excel engine. I wonder why not you include 256(DMPAPER_USER) in PaperSize enum? According to MSDN, it is a valid value. Because I want to import document just for reading content, not for printing, I don't care whether paper size contains some unknown value, but failed to load documents means we can do nothing now. Users doubt that why their documents could not be opened on our sites, while these documents work fine in Excel 2003. As a result, we could not use this engine in current product.
Anyway, thank you for your help.
You are using code page 936 (http://en.wikipedia.org/wiki/Code_page_936)
With this file there is a problem even in Excel there is wrong Page size set.
You can save your file in Unicode (The attached file is done that way) from Excel.
Thank you for your help. I don't know how to change .xls codepage in Excel 2003, it seemed that change character set in web options have no effect. And I have even no idea how to check for .xls codepage.
I've upload the .xls document with problems in attachment. Would you please kindly see what codepage is it and whether could it be solved?
Regards,