excelReader.AsDataSet() does not exist in silverlight

May 17, 2013 at 4:07 PM

I am trying to do the home page example but the AsDataSet() does not exist for me in the following two lines.

IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(e.Result);
DataSet result = excelReader.AsDataSet();

excelreader has several other functions but not the one i need to be able to read the stream.

May 22, 2013 at 9:28 AM
Edited May 22, 2013 at 9:28 AM
That is a bit strange as it is a member of that interface. I am not familiar with silverlight development however.
May 29, 2013 at 11:57 AM
In Silverlight you could use the IWorkBook Interface instead:
IExcelDataReader excelReader = ...;
IWorkBook workBook = excelReader.AsWorkBook();

foreach (IWorkSheet workSheetFromExcel in workBook.WorkSheets)