Git Product home page Git Product logo

Comments (17)

PanosKousidis avatar PanosKousidis commented on June 19, 2024 2

@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.

PanosKousidis avatar PanosKousidis commented on June 19, 2024 1

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.

rvdingDev avatar rvdingDev commented on June 19, 2024 1

@PanosKousidis,
Thank you for providing additional comments.

from exceldatareader.

appel1 avatar appel1 commented on June 19, 2024

Do you get any exception or in what way does it not work?

from exceldatareader.

rvdingDev avatar rvdingDev commented on June 19, 2024

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.

appel1 avatar appel1 commented on June 19, 2024

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.

rvdingDev avatar rvdingDev commented on June 19, 2024

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.
image

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.

rvdingDev avatar rvdingDev commented on June 19, 2024

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.

appel1 avatar appel1 commented on June 19, 2024

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.

rvdingDev avatar rvdingDev commented on June 19, 2024

I'm sorry. I pressed the wrong button.

from exceldatareader.

joydeep19 avatar joydeep19 commented on June 19, 2024

Is this bug fixed,still I am facing this issue.

from exceldatareader.

appel1 avatar appel1 commented on June 19, 2024

Is this bug fixed,still I am facing this issue.

No, not yet. Hopefully next week.

from exceldatareader.

joydeep19 avatar joydeep19 commented on June 19, 2024

Can you let me know when this issue will resolve??

from exceldatareader.

stevie6410 avatar stevie6410 commented on June 19, 2024

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.

stevie6410 avatar stevie6410 commented on June 19, 2024

Hi, I see the issue has been resolved and built. When does this package hit nuget as a pre-release?

from exceldatareader.

joydeep19 avatar joydeep19 commented on June 19, 2024

When it will available in Nuget as a prerelease?

from exceldatareader.

rvdingDev avatar rvdingDev commented on June 19, 2024

I'm also eagerly awaiting its prerelease on Nuget.

from exceldatareader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.