-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
Hi, I have an issue reading the attached file. The records variable has only one record even though there are 100+ records in the Excel file.
Report.xlsx. I had to change the extension from xls to xlsx (xls is not supported to upload here). In fact it is old version of Excel (2003).
I use this code to read the file:
var excel = new ExcelQueryFactory(@"C:\Report.xls");
var records = (from c in excel.Worksheet<ReportRecord>("Prague Management Report")
select c).ToList();
I have this data class defined:
public class ReportRecord
{
public string DEPARTMENT { get; set;}
public string SAMPLE_ID { get; set; }
public string PRODUCT { get; set; }
public string CUSTOMER { get; set; }
public string TEST_CODE { get; set; }
public string TEST_DESC { get; set; }
public DateTime DUE_DATE { get; set; }
public string RESULT_STATUS { get; set; }
public string Spec { get; set; }
}
PS: And my latest findings is that the records are all loaded when the Excel file is open in Excel. I do not understand this behavior. Thank you for any feedback.
Metadata
Metadata
Assignees
Labels
No labels