Cannot show the correct title

Dec 27, 2009 at 10:51 AM

I have a problem while using your dll to convert Excel data to DataSet, you can check the following URL:

http://exceldatareader.codeplex.com/WorkItem/View.aspx?WorkItemId=4978

Jan 25, 2010 at 7:18 PM

Hello,  I had the same problem while reading an xlsx.  

It seems that the ID is not what is mapping to the sheet.  In my case the rID was providing an accurate index.

I was able to fix the problem by changing the the creation fo the xlsxworksheet:

(XlsxWorkBook.cs  function ReadWorkbook)

from:

sheets.Add(new XlsxWorksheet(
     reader.GetAttribute(A_name),
     int.Parse(reader.GetAttribute(A_sheetId)), reader.GetAttribute(A_rid)));

to:

string rid = reader.GetAttribute(A_rid);
int id = Int32.Parse(rid.Substring(3));  // the ugly substring is to remove rID from the string and keep only the number
sheets.Add(new XlsxWorksheet(
     reader.GetAttribute(A_name),
     id, rid));