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

Sheet order changing by simply reading and rewriting data to new file #342

Open
NikhilCodes opened this issue May 26, 2022 · 3 comments
Open

Comments

@NikhilCodes
Copy link

I have this excel file.
s3data1.xlsx

I have this simple snippet.

const again = await XlsxPopulate.fromFileAsync('./s3data1.xlsx').then((workbook) => {
      workbook.toFileAsync('test.xlsx');
      return workbook.outputAsync()
    });

And I see a file test.xlsx created
test.xlsx

Now if you carefully look at both files.
Content in 2nd tab of first sheet has shifted to 4th tab of 2nd sheet.

What am I doing wrong? Any help at the earliest would be appreciated.

@mp3por
Copy link

mp3por commented Jan 23, 2023

You only need the workbook.toFileAsync(). Calling workbook.outputAsync afterwards is not needed.

@AmdEagle
Copy link

AmdEagle commented Aug 6, 2024

@NikhilCodes Did you get this issue fixed as i am facing the same problem. Would like to know more info.

@NikhilCodes
Copy link
Author

@AmdEagle what i had to do was, read the file using python pandas and save it again. After that the xlsx-populate doesnt glitch if you work on newly saved file. Reasons unknown. But works

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

3 participants