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

Very important: Loss of styles and data! #368

Open
Vaki-86 opened this issue Jun 27, 2024 · 0 comments
Open

Very important: Loss of styles and data! #368

Vaki-86 opened this issue Jun 27, 2024 · 0 comments

Comments

@Vaki-86
Copy link

Vaki-86 commented Jun 27, 2024

Hello, people!
My first test of the xlsx-populate library had a disappointing result. Note that I only executed the commands to open and save the file, without doing anything with data.

  const XlsxPopulate = require('xlsx-populate');   
  const workbook = await XlsxPopulate.fromFileAsync(filePathPosix);
  const mySheet = workbook.sheet(sheetName);
             
  // do nothing
           
  // write to file
  const filePathCopy= filePathPosix.replace('.xlsx', ' -child-1.xlsx');
  workbook.toFileAsync(filePathCopy);

test-result-compare

As you can see at first glance, the text format is gone. But if you go through all the cells with the Enter key or double-click, you can restore the appearance of these cells. (In fact, the format settings are preserved, we just have the wrong display).

And now the most important thing - the numbers after the 15th character have turned into ZEROS. This is, of course, a known Excel problem that can be solved by using a text format. But here there was a failure during saving and the information was irretrievably lost.

Xlsx-Populate version: 1.21.0
Excel version: 2016

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

1 participant