Questions tagged [exceldatareader]

Questions about ExcelDataReader, a .NET library for reading Microsoft Excel files. When using this tag, also tag the question with the programming language being used unless your question is not specific to any programming language.

ExcelDataReader is a lightweight and fast .NET library written in C# for reading Microsoft Excel (97 and newer) files.

Cross-platform:

  • Windows with .Net Framework 2
  • Windows Mobile with Compact Framework
  • Linux, OS X, BSD with Mono 2+

Project page at CodePlex: http://exceldatareader.codeplex.com/

Latest sources available at GitHub: https://github.com/ExcelDataReader/ExcelDataReader

For more information read its Read-Me file at GitHub.

141 questions
0
votes
1 answer

C# ExcelDataReader Error - 'Invalid file signature' for XLSB format

I am receiving 'Invalid file signature' error when I try to read xlsb file using below code. If I use CreateReader, then I am receiving 'Detected ZIP file, but not a valid OpenXml file' error. I have also tried other options as given below but…
Tech Learner
  • 1,227
  • 6
  • 24
  • 59
0
votes
1 answer

Want to read data from different Excel worksheets in the same Excel file using selenium c#

Have used ExcelDataReader NuGET Package. This is the class setting it up - private static DataTable ExcelToDataTable(string fileName) { //open file and returns as Stream FileStream stream = File.Open(fileName, FileMode.Open,…
HH44
  • 15
  • 1
  • 2
  • 10
0
votes
1 answer

Reading empty cells in excel for selenium webdriver data driven framework

I have around 5 records of data in an excel sheet in which one record has 5 values, one record has only 4 values and one record has only 2 values. My code is not able to handle the empty cells. I'm getting dataprovider mismatch exception. Can…
0
votes
1 answer

Consecutively reading data from Excel in C#/NUnit test cases, returns blank data for 2nd Case

I'm trying to write a parameterized NUnit test that executes twice. Each time it runs, it references a different row in a spreadsheet and gets the username and password based on int rowNum. class Test { //Run the test twice …
David Cunningham
  • 957
  • 2
  • 12
  • 22
0
votes
1 answer

How to fetch line by line (row wise) data from excel file in c# using ExcelDataReader

I want to fetch data row wise from excel file. Please find Image for Sample data. I want to fetch this data row wise using ExcelDataReader. Is there a way of doing it? Sample Imageack.imgur.com/jCSnx.png using (IExcelDataReader reader =…
0
votes
1 answer

Skip certain Rows and Columns while Parsing XLS

I'm using the following code to parse the XLS file using ExcelDataReader. I would like to exclude the first three rows, first two columns followed by any columns that are after 9. //create the reader var reader =…
user6038900
0
votes
1 answer

ExcelDataReader does not read floats with comma like "123,45" (instead reads "123.45")

How can I read float values with comma like 123,45? I have to read third party excel files that come formatted like 123,45 and I can not / am not allowed to reformat them to 123.45. I am now using this method: string GetCell(int row, int col) …
user12445601
0
votes
0 answers

Read table with ExcelDataReader using Excel range

Is there a way to read data table with ExcelDataReader using the Excel range (such as A1:B9)? I am looking for something like: string tableName = "MyTable"; string range = "A2:B9"; using (var stream =…
0
votes
1 answer

ExcelDataReader for Visual Basic

I'm trying to read the values from an excel file's stream, unfortunately, after installing ExcelDataReader and ExcelDataReader.DataSet from NuGet packages, I can't create the class IExcelDataReader. It doesn't read the Import neither. Imports…
JL-UM
  • 1
  • 1
  • 1
0
votes
0 answers

Reading a Data cell value from excel

I am reading an excel file and am trying to find out which of the cell values are date values. Now, I tried doing it with getCellType of Apache POI SS User Model but the problem is my excel is returning String value even for the cells which contains…
MitSM
  • 21
  • 11
0
votes
1 answer

As soon as If statement is true the loop stops, I dont know how to continue the loop

As soon as the the program code checks the first column that's invalid in the excel file, it doesn't continue to check the rest. Is there a way the loop still continues and checks for the rest of the columns? ValidationFile Code is given below. It…
Kira
  • 27
  • 5
0
votes
0 answers

Reading the contents of the XLS file using ExcelDataReader

I use the following code to read the contents of the xls file using ExcelDataReader. List excelFiles = GetExcelFileNamesInDirectory(Application.persistentDataPath); for (int i = 0; i < excelFiles.Count; i++) { …
user6038900
0
votes
0 answers

ExcelDataReader is showing that multiple sheets exist in an excel file, even though the file has only one sheet

I am using ExcelDataReader to read the first sheet of the an Excel file. However, ExcelDataReader is telling me that multiple sheets exists in an Excel file even though I only see one sheet when I open the excel file in Excel. This is the first time…
Ritzies
  • 33
  • 1
  • 7
0
votes
0 answers

Import *.xlsx data via ExcelDataReader with 0 number of records affected

I use ExcelDataReader and ExcelDataReader.DataSet libraries to read over 1700 rows from and xlsx-file. Eventually, there are no records read. However if we restrict number of rows in a dile down to 9 - all the rows data are read correctly. Here is…
0
votes
0 answers

ExcelReaderFactory and razor pages validating if is the correct file using excelReader

Can't validate if is the correct file, the code breaks but file passes always. [BindProperty, Required(ErrorMessage = "Please select a file!"), Attachment] public IFormFile Upload { get; set; } public async Task
RAAPereira
  • 49
  • 5