You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I have some code that opens a file and deletes all sheets apart from a single sheet. The code then creates more sheets and populates them with data using file.SetCellValue. If the code created the file itself it does not work, if I created the file and the code then edits it then it does work.
The problem is that when I open the file in Excel I get an error and Excel tries to repair the file. The inserted data is gone after the repair.
Run the code again to "edit" the file, although it just sets the same values in all cells
Open the edited file in excel
Describe the results you received:
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Replaced Part: /xl/worksheets/sheet2.xml part with XML error. Declared prefix. Line 2, column 143.
Replaced Part: /xl/worksheets/sheet3.xml part with XML error. Declared prefix. Line 2, column 143.
Note that I have not created a sheet by these names.
Describe the results you expected:
I expected to see the new sheets with the new data and no error message.
Output of go version:
go version go1.15 windows/amd64
Excelize version or commit ID:
v2.4.0
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Windows 10
Excel version: 16.0 (Microsoft 365)
The text was updated successfully, but these errors were encountered:
Description
I have some code that opens a file and deletes all sheets apart from a single sheet. The code then creates more sheets and populates them with data using file.SetCellValue. If the code created the file itself it does not work, if I created the file and the code then edits it then it does work.
The problem is that when I open the file in Excel I get an error and Excel tries to repair the file. The inserted data is gone after the repair.
Steps to reproduce the issue:
temp.zip
Describe the results you received:
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Replaced Part: /xl/worksheets/sheet2.xml part with XML error. Declared prefix. Line 2, column 143.
Replaced Part: /xl/worksheets/sheet3.xml part with XML error. Declared prefix. Line 2, column 143.
Note that I have not created a sheet by these names.
Describe the results you expected:
I expected to see the new sheets with the new data and no error message.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Windows 10
Excel version: 16.0 (Microsoft 365)
The text was updated successfully, but these errors were encountered: