Not reading last column
See original GitHub issueHi,
I’m using the following code to read a excel file, but it’s not reading the last column:
`public static DataSet ReadExcel2003(Stream stream) { DataSet result = new DataSet(); var tmpFile = Path.GetTempPath() + Guid.NewGuid().ToString() + “.xls”;
FileStream fileStream = File.Create(tmpFile, (int)stream.Length);
byte[] bytesInStream = new byte[stream.Length];
stream.Read(bytesInStream, 0, bytesInStream.Length);
fileStream.Write(bytesInStream, 0, bytesInStream.Length);
fileStream.Close();
stream.Close();
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("pt-BR");
using (IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(File.Open(tmpFile, FileMode.Open, FileAccess.Read),ReadOption.Strict))
{
result = excelReader.AsDataSet();
}
File.Delete(tmpFile);
return result;
}
`
I attached the file I’m trying to read, the yellow cells are not being reading.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9
Top Results From Across the Web
Skipping last column in r with read.csv
I've tried in one line of R to get on data , all 5 of first 6 columns, so not the last one....
Read more >INFILE not reading last column (numeric variable) of csv file
I'm trying to read in a .csv file in a SAS data step. The last column of the file, a numeric variable, is...
Read more >Excel power query last column missing in input file
I have created a query some month ago which is no longer working because the last column of my input file (csv) is...
Read more >Solved: MIssing last column in Power Query
Solved: Hi All, I have a query setup which imports new data from various excel sheets each week. However this morning and for...
Read more >Incorrect reading of file when last column has all missing ...
All the values of the last column should be set as missing, but the first value of row 2 is put as the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wizardgsz Yes, I ran TestApp look: