Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Unassigned: Mass deleting then creating comments causes corruption [14922]

$
0
0
I used the latest source code (commit 1c0510c8d300, Aug 08, 2013) to see if this was fixed or not, but it doesn't seem to be.

If you follow these steps you end up with a corrupted spreadsheet:

- Add comments to a worksheet
- Save and close package

- Open package
- Delete all comments (i use this line of code)
```
while (curWorksheet.Comments.Count > 0) curWorksheet.Comments.RemoveAt(curWorksheet.Comments.Count - 1);
```
- Re-add comments
- Save and close the package

Now when you try and open it in excel you will get a message like: "Removed Part: /xl/comments1.xml part with XML error. (Comments) Incorrect document syntax. Line X, column X."
```

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error035320_02.xml</logFileName><summary>Errors were detected in file '\\sh172edt\home\u413975\_ImportInProgressCAEZAHNP.xlsx'</summary>-<removedParts summary="Following is a list of removed parts:"><removedPart>Removed Part: /xl/comments1.xml part with XML error. (Comments) Incorrect document syntax. Line 19, column 27.</removedPart></removedParts></recoveryLog>
```
Comments: I am getting similar error how did you fixed this issue

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>