Skip to content
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

Open word file with comments and save in a new one, corrupts the word file #1481

Open
1 task done
sc-cpais opened this issue Jan 23, 2025 · 0 comments
Open
1 task done
Labels

Comments

@sc-cpais
Copy link

sc-cpais commented Jan 23, 2025

NPOI Version

2.7.2

File Type

  • DOCX

Upload the Excel File

template_comment.docx

Reproduce Steps

using NPOI.XWPF.UserModel;

string template = @"template_comment.docx";
using FileStream fileStream = File.OpenRead(template);
XWPFDocument document = new(fileStream);

// Create new document
string generateFile = @"output.docx";
using FileStream outputStream = File.Create(generateFile);
document.Write(outputStream);

Issue Description

When running this code, simply open and save a new file, if the word file has comments, the new word file gets corrupted

@sc-cpais sc-cpais added the bug label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant