Skip to content

Found problem with some content #1366

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
censys-git opened this issue Jul 1, 2020 · 13 comments
Open

Found problem with some content #1366

censys-git opened this issue Jul 1, 2020 · 13 comments

Comments

@censys-git
Copy link

💬 Questions and Help

I am working with exceljs to incorporate into a NetSuite environment. Using it on the browser side due to limitations with NetSuite's server-side JavaScript platform, so currently using version 4.0.1 through cloudflare CDN load.

I start with a pre-built Excel file that has three tabs. One of these tabs is my "template" to copy and create anywhere between 10 and 20 other tabs. There are some columns that are added dynamically based on user preference that first get setup on this template sheet, then I proceed to copy the sheet (new name), and then add rows of data specific to the individual new sheet. This includes adding some formulas, some reformatting, and data validation (simple whole number greaterthanorequal to 0).

The file builds and saves fine, but when I open the excel file, I get:
"We found a problem with some content in 'filename.xlsx'. Do you want us to try and recover as much as we can?"

When I click "Yes", it repairs and a little dialog box displays telling me it has repaired xyz and lists every sheet I added as well as the template sheet, all with the same reason: "Repaired Records: Column information from /xl/worksheetssheet[n].xml part"

Of course, as has been mentioned in numerous issues on corrupt files and across the ether, Microsoft's log for this is absolutely useless information (not even sure why they bother to log it).

I took the before file and looked at the sheets in their XML format as well as the repaired sheets in their XML format and compared the sheets (an example of both attached). I can't make heads or tails of what I am mostly reading, but in terms of comparisons, beside some ids being changed, I really cannot see a difference between them (nothing stands out anyway).

I'm at wits end here. This is a project for a client (my first using exceljs) so hoping to resolve as the intent is to distribute this to the client's customers and would not be good to be sending them a "corrupt" file. Right now, the workaround is to open, repair, re-save, then distribute, but the whole point of the project is to build this file, save it to the NetSuite file cabinet, then use NetSuite to automatically email it to customers (no intermediate intervention), so the workaround kind of defeats the purpose of the project.

Hoping some of the experts here can possibly direct me in the right direction or recognize an obvious issue I can fix.
worksheet-comparison.zip

@namiwang
Copy link

Encountered the same issue. Can provide files to re-produce if needed.

@marcoamonteiro
Copy link

Encountered the same issue. Has anyone been able to resolve this?

@OscarDTorresB
Copy link

Same issue right here. Is there any solution already?

@coding-chris-kao
Copy link

Same issue here, is this fixed?

@OscarDTorresB
Copy link

I just want to point out that at the end the issue I was facing was a problem in a table I was creating. It turns out that excel doesn't goes along with tables where its name contains underscores in it (there are more rules but that one was the one that I violated). Changing the table name to something else without an underscore fixed it.

image

(screenshot taken from this page. )

@coding-chris-kao
Copy link

In my case, the file was corrupted after I simply read the file and wrote it out without any changes.
I've already changed the file names as simple as I can

import ExcelJS from "exceljs";

async function main() {
  const workbook = new ExcelJS.Workbook();
  await workbook.xlsx.readFile("./files/input.xlsx");
  await workbook.xlsx.writeFile("./files/output.xlsx");
}

main();

Maybe my excel file is too complicated?
Because it contains a lot of existing fields, formulas, images, dropdown boxes, and macros...

@Tri-Vi
Copy link

Tri-Vi commented Oct 5, 2022

Encountered the same issue. Has anyone been able to resolve this?

@OrenSayag
Copy link

I also encounter this problem

@caiorsantanna
Copy link

I just want to point out that at the end the issue I was facing was a problem in a table I was creating. It turns out that excel doesn't goes along with tables where its name contains underscores in it (there are more rules but that one was the one that I violated). Changing the table name to something else without an underscore fixed it.

image

(screenshot taken from this page. )

That fixed for me, thanks

@Siemienik
Copy link
Member

fixed in #2257

@herdyc
Copy link

herdyc commented Jul 30, 2024

@coding-chris-kao I am encountering same issue as yours. I got basic calculations and Indexing only. Tried with and without macros (xlsx and xlsm). Both same result. Did you find the solution?

@mixa9269
Copy link

I've got this error when I put more than 32767 symbols in one cell. (It's Excel limitation)

@ahwitz
Copy link

ahwitz commented Mar 31, 2025

One other note on the "Column Information" one, just to make the fix I find Googleable - if you've run spliceColumns, check to make sure you didn't go over the total column limit in Excel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests