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
1
vote
1 answer

Dropping columns or rows while reading excel

I use the following code to loop through the excel sheet using ExcelDataReader. private void GetExcelSheetData(IExcelDataReader reader) { do { while (reader.Read()) { for (int i = 0; i <…
user6038900
1
vote
1 answer

Parsing xlsx files with unity

I use the following code to parse an XLSX file. private IExcelDataReader GetExcelDataReaderForFile(string filePath) { FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read); // Create the excel data reader …
user6038900
1
vote
1 answer

ExcelReaderFactory, reading from SftpFileStream

I am getting an error while reading a .xlsx file using ExcelReaderFactory.CreateOpenXmlReader(streamReader) and stream reader is a SftpFileStream (SftpClient.OpenRead(filePath)). The error message i am getting is Renci.SshNet.Common.SshException:…
1
vote
2 answers

How to get column width using ExcelDataReader library?

I know how to get RowHeight using(var xls2003Stream = new MemoryStream(xlsBytes)) { using(var reader = ExcelReaderFactory.CreateReader(xls2003Stream)) { var height = reader.RowHeight; ... } } but the question is - can I…
Mr-Cas
  • 11
  • 2
1
vote
3 answers

How can I iterate over an excel file

How can I iterate over an excel file? I currently have a class using ExcelDataReader Class => https://paste.lamlam.io/nomehogupi.cs#14fXzlopygZ27adDcXEDtQHT0tWTxoYR I have a excel file with 5 columns This is my current code, but it is not exporting…
Krol Noir
  • 35
  • 7
1
vote
3 answers

Check whether Excel file is password protected in .NET Core

Tech: C# ASP.NET Core 2.0 Excel (Mostly OpenXml, but occasional legacy document) Currently using ExcelDataReader to read the files. Scenario: I need to store some files on a server and access them later to do work. Users upload the files through a…
Query
  • 123
  • 1
  • 9
1
vote
5 answers

uploading and reading from an excel file in asp.net core 2

previously Asp.Net MVC had this third party library which easily allowed uploading and reading from an excel file called Excel Data Reader. We didn't need to have the file on the local disk, which was great because my application needs to run on…
Riz
  • 6,486
  • 19
  • 66
  • 106
1
vote
2 answers

How to get the contents a particular cell using excel data reader in c#?

I have a xlsx file like (it is the first sheet) Postcode Sales_Rep_ID Sales_Rep_Name Year Value 2121 456 Jane 2011 $84,219 2092 789 Ashish 2012 $28,322 2128 456 …
Bumba
  • 321
  • 3
  • 13
1
vote
1 answer

Invalid Data Exception when using ExcelDataReader

I have a program that reads Excel file using ExcelDataReader.dll. Everything was perfect until I moved the file reading to a new task: Stream output = new MemoryStream(); httpRequest.Files[0].InputStream.CopyToAsync(output); ImportDataWriter…
Rachel Fishbein
  • 818
  • 2
  • 12
  • 29
1
vote
4 answers

ExcelDataReader reads all invisible sheets

In Excel there is a feature to hide some worksheets. I am reading a document which contains these kind of sheets and I want to ignore them. This is the place which I can hide, or unhide worksheets: On the Home tab, in the Cells group, click…
Arman Fatahi
  • 2,635
  • 3
  • 24
  • 37
1
vote
0 answers

Upload Excel file with Japanese font

I have a Japanese Excel ('.xls') file, I need to upload it to server using IExcelDataReader. below is my code: IExcelDataReader reader; DataSet dataSet = null; if (fileExtension == ".xlsx") { // .xlsx reader = …
Minh Bui
  • 1,032
  • 8
  • 18
1
vote
1 answer

Error while uploading .xlsx file using ExcelDataReader

I am working on asp.net MVC project. I use ExcelDataReader component to read excel file records. Now when I published my project to server and upload a .xlsx file with uploader I get below mentioned exception message. There are no errors with local…
Mahdi Radi
  • 429
  • 2
  • 10
  • 30
1
vote
1 answer

Sqlbulkcopy gives error on float conversion (asp.net c#)

Iam trying to insert bulk of excel to sql sqlBulk.WriteToServer(dReader); gives error The given value of type String from the data source cannot be converted to type float of the specified target column. Iam using below code …
1
vote
2 answers

ExcelDataReader 2.1.0 : Read Special Character like '%'

I am using nuget Package named ExcelDataReader in MVC application to read Excel sheet and convert it to HTML.All sounds goof but i am not able to read special character from excel sheet.For example is cell value is "59%" but its reading 0.59.So how…
Csharp
  • 177
  • 4
  • 15
1
vote
1 answer

ExcelDataReader close exception "The directory is not empty."

I am getting The directory is not empty exception from my code only when I deploy it on the server. Debugging through the exception found that there is some glitch with the excelReader.Close(); Code is as follow IExcelDataReader excelReader =…
Niks
  • 110
  • 1
  • 1
  • 10