I get a "wrong code page" error trying to import an excel document.
...........
ExcelDataConnectionSettings excelDataSettings = new ExcelDataConnectionSettings { FileStream = fileStream, GeneratedTypeName = PivotGridStrings.XPG_ExcelFileDataSource_InitialCube, WorksheetName = PivotGridStrings.XPG_ExcelFileDataSource_WorksheetName }; ExcelDataConnectionSettings.AddExcelCellFormatMapping(PivotGridStrings.XPG_ExcelFileDataSource_ExcelFormatSrc, PivotGridStrings.XPG_ExcelFileDataSource_ExcelFormatDest); ExcelDataConnectionSettings.AddExcelDateTimeCellFormatMapping("d/m/yy;@", "M/d/yy"); flatDataSource.Cube = DataSourceBase.GenerateInitialCube(PivotGridStrings.XPG_ExcelFileDataSource_InitialCube);
..........
Can I do something in my C# code so I will be able to import any Excel documents without problem ?
Hi,Could you check what's the encoding set to your document? Silverlight supports just a subset of all available encodings. You can check the encoding going to File -> Options. Then in Advanced tab scroll down to Web Options.
I hope that will help.
Plamen.
Thank you for your response.
The encoding is "Greek ISO".
did you succeed to import the excel file I sent you ?
Yes, I did. But as I said you have to change the encoding. Once I have changed it to UTF-8 everything goes fine.
Also I want to mention that we haven't support for all excel date-time formats and if you can't see dates displayed correctly you have to add a date-time format mapping. It is such case with your file and I had to add
in order to get dates displayed correctly.