You may need to read use Stream.CopyTo to read everything in the InputStream into a seekable MemoryStream. Otherwise you may have issue with the InputStream not being seekable.
↧
New Post: Reading excel sheet without saving
↧
New Post: Reading formatted strings
So your problem really is that you no longer know what timezone the user entered because the date ends up as UTC?
↧
↧
New Post: Reading formatted strings
Hi Ian,
I found out that in Excel you can format a datetime cell (double) in ISO8601 but you can't add the timezone value (es. +02:00) to the format string. So magically my problem is solved.
Thanks anyway.
I found out that in Excel you can format a datetime cell (double) in ISO8601 but you can't add the timezone value (es. +02:00) to the format string. So magically my problem is solved.
Thanks anyway.
↧
New Post: Reading formatted strings
Ok. good
↧
New Post: Reading excel sheet without saving
Ok thanks,
modified code as per you suggested. Is this ok?
MemoryStream memStream = new MemoryStream();
Stream myStream = FileUploadControl.PostedFile.InputStream;
myStream.CopyTo(memStream);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(memStream);
excelReader.IsFirstRowAsColumnNames = true;
DataSet ds1 = excelReader.AsDataSet();
excelReader.Close();
↧
↧
New Post: Reading excel sheet without saving
That looks about right. Does it work?
↧
New Post: AutoSize columns in excel sheet
Hi,
I am using ExcelDataReader nuget. It works pretty fine. But causes a problem if i have the first column displaying data such as '####'. This is because the column size is shrink-ed. If i resize it or double click the row reader and save that excel file, it reads the data properly.
Please help me out as I don't want to use any Interop libraries.
Appreciating your time and response.
I am using ExcelDataReader nuget. It works pretty fine. But causes a problem if i have the first column displaying data such as '####'. This is because the column size is shrink-ed. If i resize it or double click the row reader and save that excel file, it reads the data properly.
Please help me out as I don't want to use any Interop libraries.
Appreciating your time and response.
↧
New Post: AutoSize columns in excel sheet
That sounds a bit strange because as far as I know displaying ### is just a ui thing and is not actually reflected in the data value. I tried it myself with a spreadsheet and it worked ok.
Are you able to provide an example file?
↧
Released: 2.1.2.0 (Jan 30, 2014)
Fixes
- Fixes for some SSRS sourced files (out of range checks)
- Missing columns on xlsx generated by google docs
- Corrupt xls goes into infinite loop
- No data on xlsx generated by google docs
- Xlsx with multiple sheets has no first row on last sheet
↧
↧
Updated Release: 2.1.2.0 (Jan 30, 2014)
Fixes
- Fixes for some SSRS sourced files (out of range checks)
- Missing columns on xlsx generated by google docs
- Corrupt xls goes into infinite loop
- No data on xlsx generated by google docs
- Xlsx with multiple sheets has no first row on last sheet
↧
Commented Unassigned: Inaccurate column count causes data to be missed. [12605]
Discussion [https://exceldatareader.codeplex.com/discussions/474291](https://exceldatareader.codeplex.com/discussions/474291)
I am trying to read in a large amount of data using your wonderful tool, which is ideal.
The problem is that the xlsx file in question has presumably been generated by a tool, as unless you manually open and then save and close the file, the ExcelDataReader will only read in the first column.
There are in fact 13 columns, but the first 2 rows are merged.
Having looked at the source code and stepped through, I can see that while reading the rows in, the array to hold the values is 1 in size, so all the following values are not saved, even though they are read in.
Any help would be much appreciated. :)
Comments: ** Comment from web user: TMVector **
I am trying to read in a large amount of data using your wonderful tool, which is ideal.
The problem is that the xlsx file in question has presumably been generated by a tool, as unless you manually open and then save and close the file, the ExcelDataReader will only read in the first column.
There are in fact 13 columns, but the first 2 rows are merged.
Having looked at the source code and stepped through, I can see that while reading the rows in, the array to hold the values is 1 in size, so all the following values are not saved, even though they are read in.
Any help would be much appreciated. :)
Comments: ** Comment from web user: TMVector **
Sorry to reply so late, only recently came back to work.
I'm afraid it did not fix the issue. Perhaps my file is simply poorly generated.
Thank you very much for your help though :)
↧
New Post: Excel attributes
+1
↧
Created Unassigned: Excel Versions Supported? [12738]
Hi,
I would like to know which versions of Excel is supported? I tried importing a Microsoft Excel 5.0/95 Workbook and had an Array out of bounds error and also the column headers has lots of special characters..
Any idea what might be causing this?
Regards,
Vishal
I would like to know which versions of Excel is supported? I tried importing a Microsoft Excel 5.0/95 Workbook and had an Array out of bounds error and also the column headers has lots of special characters..
Any idea what might be causing this?
Regards,
Vishal
↧
↧
Reviewed: 2.1.2.0 (2 11, 2014)
Rated 5 Stars (out of 5) - thank you very much
↧
New Post: AutoSize columns in excel sheet
Hi,
I was mistaken. It does reads the data when present in ### format.
I am attaching an Excel sheet. Without editing or saving , try reading the file. ExcelDataReader will return no data.
Now just open the file and save it..ExcelDataReader works absolutely fine without any issues.
I know this seems to be a lot more weird but i am unable to find the reason for this issue.
Thank you for your time.
P.S How do I upload an excel file for this tread on Codeplex?
I was mistaken. It does reads the data when present in ### format.
I am attaching an Excel sheet. Without editing or saving , try reading the file. ExcelDataReader will return no data.
Now just open the file and save it..ExcelDataReader works absolutely fine without any issues.
I know this seems to be a lot more weird but i am unable to find the reason for this issue.
Thank you for your time.
P.S How do I upload an excel file for this tread on Codeplex?
↧
Commented Issue: "BIFF Stream error" when converting to dataset [11636]
Hi,
I am using the 2.1 beta binaries.
when trying to open a SQL server reporting services generated excel, and converting to a dataset, I get the following exception:
ArgumentException was unhandled
"BIFF Stream error: Buffer size is less than entry length"
```
string excelPath = @"actualfullpathofexcelfile.xls";
FileStream streamExcelBase = File.Open(excelPath, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReaderBase = ExcelReaderFactory.CreateBinaryReader(streamExcelBase);
//below line throws exception
DataSet reportDataset = excelReaderBase.AsDataSet();
```
Any ideas?
Thanks in advance.
Faiz
Comments: ** Comment from web user: kunaluppal **
I am using the 2.1 beta binaries.
when trying to open a SQL server reporting services generated excel, and converting to a dataset, I get the following exception:
ArgumentException was unhandled
"BIFF Stream error: Buffer size is less than entry length"
```
string excelPath = @"actualfullpathofexcelfile.xls";
FileStream streamExcelBase = File.Open(excelPath, FileMode.Open, FileAccess.Read);
IExcelDataReader excelReaderBase = ExcelReaderFactory.CreateBinaryReader(streamExcelBase);
//below line throws exception
DataSet reportDataset = excelReaderBase.AsDataSet();
```
Any ideas?
Thanks in advance.
Faiz
Comments: ** Comment from web user: kunaluppal **
I got the same issue today, while working on a crystal report generated excel. I am using the latest dlls. Was this issue not fixed ?
↧
Reviewed: 2.1.2.0 (Feb 17, 2014)
Rated 5 Stars (out of 5) - Awesome Work guys!
↧
↧
Commented Task: Nuget package [11518]
I can see this package is not updated on Nuget yet.
Comments: ** Comment from web user: vertigo093i **
Comments: ** Comment from web user: vertigo093i **
Updated package with latest 2.1.2 binaries.
↧
Commented Task: Nuget package [11518]
I can see this package is not updated on Nuget yet.
Comments: ** Comment from web user: Ian1971 **
Comments: ** Comment from web user: Ian1971 **
Brilliant, thanks. I have uploaded it to nuget
↧
Reviewed: 2.1.2.0 (Feb 19, 2014)
Rated 5 Stars (out of 5) - very useful, thanks a lot
↧