Need Help i get error message on using excel; can help me take a look thanks

  • Thread starter Thread starter christing
  • Start date Start date
C

christing

Guest
I get error message on below code.did i missing insert anything. the purpose i create this project is want excel file can convert to txt file using c# code

using Excel;

// Reading Excel file format; *.xlsx
FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
result = excelReader.AsDataSet();
excelReader.Close();

// Reading Excel file ('97-2003 format; *.xls)
FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
result = excelReader.AsDataSet();
excelReader.Close();

All bold text is a error code i get from my program

Continue reading...
 
Back
Top