Comments (17)
@rvdingDev, @appel1
I ran into the same issue and traced it down to the breaking change introduced in .NET 6: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams
The DeflateStream behaves differently now as it is more similar to the way the standard streams work.
I created the PR above that solves this issue - I wasn't able to produce a simple file with the problem, as the one I was using was pretty complex. But I think it happens when the sheet has a lot of data (my example had 81 rows 255 columns and it was only loading a few), due to the fact that the DeflateStream in BiffReader.cs returns less data than expected even if the stream is not finished
from exceldatareader.
Nice, it looks like you already addressed this issue but missed this bit. ReadAtLeast seems to be doing the job as well so that simplified the PR a lot
from exceldatareader.
@PanosKousidis,
Thank you for providing additional comments.
from exceldatareader.
Do you get any exception or in what way does it not work?
from exceldatareader.
I'm not sure if I explained it properly because I'm not familiar with English.
I'm having an issue reading data from a Korean Excel file in a UTF-8 encoding environment.
Even though no exceptions are thrown, the Read() method and DataSet aren't functioning as expected.
The number of rows are correctly imported, but the values that should be in each cell are being read as DBNull. Also, while the number of columns are correctly imported, the column names aren't properly read. Instead, they're being generated as 'Column1', 'Column2', etc.
This issue occurs in .NET 7.0.
It worked correctly when I performed a unit test in the .NET Framework.
from exceldatareader.
Could you provide me with a sample .xlsb file that reproduces this issue? The .xlsb files I've tried works with .NET 7.0.
Does .xlsx files in Korean work for you?
from exceldatareader.
I wanted to make a test file, but if I made the file myself, it worked really well. But the object is created as an OpenXmlReader object and is read.
I can't give you the file because the data is prohibited from leaking.
Files are contain many sheet references, file references, and column references in the company excel file.
But I'll show you the results of UnitTest.
I am importing the sheet called '#TargetDefine' in the .xlsb file, but the sheet is all written in English and there are no empty cells, and the column 'PatentName' is written in a formula, so I think it comes out properly. String is not working.
I tried cloned and debugged the repository.
The .xlsb file is created as an OpenXmlReader object without being read to the BinaryReader() method through the CreateReader() method, so the AsDataTable method itself.Value is null when proceeding GetValue(i)...
I'm not sure what to do.
Additionally, the .xlsx file works perfectly.
from exceldatareader.
I'm Sorry.
I'm trying to create a test file for replication, but it's not going well.
It seems like there are certain conditions that make it difficult.
from exceldatareader.
Thanks.
I thought I had fixed this as part of #621 but obviously it was not a complete fix.
Can ReadAtLeast be used here too?
from exceldatareader.
I'm sorry. I pressed the wrong button.
from exceldatareader.
Is this bug fixed,still I am facing this issue.
from exceldatareader.
Is this bug fixed,still I am facing this issue.
No, not yet. Hopefully next week.
from exceldatareader.
Can you let me know when this issue will resolve??
from exceldatareader.
Hi, i've also just updated to .NET 7 from 5 and .xlsb is is broken for me too. v3.6.0 package.
Is there any workaround I can apply in the meantime?
from exceldatareader.
Hi, I see the issue has been resolved and built. When does this package hit nuget as a pre-release?
from exceldatareader.
When it will available in Nuget as a prerelease?
from exceldatareader.
I'm also eagerly awaiting its prerelease on Nuget.
from exceldatareader.
Related Issues (20)
- DateTime incoherent value HOT 9
- Reading data as a string HOT 3
- Read data from specific column/row? HOT 1
- Extract text from big documents faster HOT 3
- Enumeration yielded no results HOT 1
- Suggestion for adding reading named range HOT 2
- "End of Central Directory record could not be found" Random Error during CreateReader HOT 1
- IExcelDataReader.AsDataSet() does not contains definition for AsDataSet HOT 1
- IExcelDataReader.Read() and .GetXXX() methods are so slow HOT 6
- Export Control Classification Number (ECCN) for the library
- How do I get data in a DataTable and/or Observablecollection? HOT 3
- Getting Null values when reading xlsb file using ExcelDataReader HOT 3
- XLSX link cell type HOT 1
- Getting Null values when Reading xlsb file HOT 1
- JObject.FromObject on xlsx file throws "Can not add Newtonsoft.Json.Linq.JProperty to Newtonsoft.Json.Linq.JProperty" HOT 1
- CSV File - Delimiter Between Quotes HOT 3
- How to read an excel file with linked data type HOT 2
- DotNet 8 Support HOT 1
- Error CS0426 The type name 'CreateReader' does not exist in the type 'ExcelReaderFactory' HOT 4
- Detected ZIP file, but not a valid OpenXml file. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exceldatareader.