Closed lileyzhao closed 6 months ago
Now I have given up on using the do-while approach forcefully in the strongly-typed reading library I am developing to address this issue, as the do-while approach is not standard. However, I should provide feedback on this issue to you.
I've identified the issue and implemented a fix in a pre-release package: https://www.nuget.org/packages/Sylvan.Data.Excel/0.4.20-b0001 Let me know if this resolves the issue for you. I'm going to also try to address #159 before pushing a final 0.4.20 build.
The version 0.4.20-b0001
indeed resolved my issue, so I no longer have problem #149. When will the official release be available on NuGet?
This is fixed in 0.4.20, just pushed to nuget.
Here is the sample code, using the file: table1.xlsx
Now, Please compare the output with the columns in Sheet3 of the file.
The issue is that when reading the first row of Sheet3 in NoHeaders mode, null values are retrieved starting from column H. Through my experiments, I found that this is influenced by Sheet2, as Sheet2 only goes up to column G, thereby affecting Sheet3 to read only up to column G. If the content of Sheet2 is deleted or Sheet2 is removed entirely, the values from column H onwards can be correctly read.
I just identified the issue but I don't know how this strange problem occurred.
Actually, I am in the process of writing an Excel strongly-typed reading library based on Sylvan.Data.Excel because the strong typing support of Sylvan.Data.Excel does not meet my requirements. While developing this library, I encountered this issue because I need complete control over columns and data processing, necessitating the use of the NoHeaders mode for reading. However, I found that in the above situation, using NoHeaders mode results in losing values after column H.
Considering the previous issues, you now understand why I attempted to use the do-while approach for reading, as I discovered that do-while can indeed read values beyond column H.