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

table.AddRows() not working #1668

Open
grubersimon opened this issue Nov 5, 2024 · 1 comment
Open

table.AddRows() not working #1668

grubersimon opened this issue Nov 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@grubersimon
Copy link

EPPlus usage

Commercial use (I have a commercial license)

Environment

Windows 11

Epplus version

7.4.2

Spreadsheet application

Excel

Description

My application requires to add rows to existing tables in sheet, which works without any exception.
But when opening .xlsx file, following message appear:

We have recognised a problem with some of the content in ‘XXXX.xlsx’. Should we restore as much as possible?

Code

 private void AddTableRows(int rowCount, ExcelWorksheet worksheet, string? tableName = null)
 {
     var table = tableName != null ? worksheet.Tables[tableName] : worksheet.Tables.First();
     table.AddRow(rowCount);
}

If i press yes, table dissapeared and some columns are wrong formated.
When using a blank .xlsx file with just a single table, it works. The problem is my existing excel-template include 30+ sheets, with a lot of pivot-tables, tables and diagrams.

Maybe you can help me out. Thanks!

@grubersimon grubersimon added the bug Something isn't working label Nov 5, 2024
@swmal
Copy link
Contributor

swmal commented Nov 5, 2024

If this is something that isn't repeatable with a simple file, we would need your Excel file to investigate the error. Since you have a commercial license, do you have access to our support portal? If so you can upload your file privately to us and we can investigate the issue. If you haven't access, send an email to info at epplussoftware.com with the license number and we will ensure that you get access.

If you can replicate the issue in a file that doesn't contain sensitive data please attach it to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants