Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Performance Issue: Adding Multiple Rows to a Word Table Using NPOI Takes Excessive Time #1472

Open
1 of 5 tasks
mysoftlab opened this issue Jan 12, 2025 · 0 comments
Open
1 of 5 tasks

Comments

@mysoftlab
Copy link

mysoftlab commented Jan 12, 2025

NPOI Version

2.7.2

File Type

  • XLSX
  • XLS
  • DOCX
  • XLSM
  • OTHER

Upload the Excel File

template.docx

Reproduce Steps

Reproducible code
Demo.zip

  1. Create a Word document with a table using NPOI.
  2. Use NPOI to programmatically add multiple rows (e.g., 12 rows) to the table
  3. Observe the time taken for the operation to complete.

Issue Description

The operation takes an excessive amount of time, with 12 rows taking over 30 seconds to be added. This performance issue becomes more pronounced as the number of rows increases.The performance bottleneck appears to be in the CT_Row.Copy method,This method seems to have inefficiencies when handling multiple row copies, leading to the observed slowdown.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants