-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables gets corrupted when removing rows #1539
Comments
it also happens when you have a table with one record and then duplicating the row (kinda needed to extend the table per say) my findings are the following.
turns to
|
so, did more research and just tried to create the table from the library. lets say i create a 3 x 3 table (including header) if i set values to the 4th row, the table does not expand which i think its fine. if i insert or duplicate a record on the 2nd row (1st row with values) and then set the values, it works. if i insert on 3rd row it works. if i duplicate 3rd row into 4th row, it does not work OK! so at least i found a way for my use case. the workaround i did was. if the template only has one record, then i insert a record which makes the table 2 records. then i can duplicate the last record with data which persists some styles and formulas, overwrite variables. then i delete that last empty record i created on the table. so now i can work, hopefully all this information allows you to get to the bottom of this. |
Here is my guess. i dont test it because i dont have go setup InsertRows does "adjustHelper" at the very last step. in contrast, the duplicateStep does it somewhere in the middle. maybe either move it to the end or do it twice? not sure. |
Hi @spearmootz, thanks for your issue. I have fixed this, please try to upgrade the master branch code, and I have updated the WebAssembly ports excelize-wasm. This patch will be released in the next version. |
Description
Table becomes corrupt when removing rows. i have found no way to modify the sample file to have only 1 record without some form of corruption on the table.
NOTE: i am using excelize-wasm
maybe related. #387
i am trying to modify an excel template, but i have to hack certain things to achieve non corrupt files and even then there are limitations.
Steps to reproduce the issue:
Describe the results you received:
table formatting was lost or file became corrupt
Describe the results you expected:
that the table is left intact with no corruption in the file
things that do work
Output of
go version
:Excelize version or commit ID:
Mac OS
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OS 13.3.1
Excel 16.69.1
The text was updated successfully, but these errors were encountered: