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

[BUG] 这个excel打开之后再保存使用office excel打开会提示损坏 #32

Open
bleehome opened this issue Jun 21, 2024 · 0 comments

Comments

@bleehome
Copy link

如题,demo.xlsx打开之后再write就会显示损坏
最终定位到是 A1 单元格有奇怪的样式(具体什么样式不清楚,最终用户的excel不停删除单元格定位出来的)

`
const ExcelJS = require('excelize');

(async()=>{
const workbook = new ExcelJS.Workbook();
const wb = await workbook.xlsx.readFile('demo.xlsx');
const sheet = wb.worksheets[0];
//这里对 sheet 单元格的write操作不是必须的
await output.xlsx'); //output.xlsx 用office excel打开会提示损坏
})();

`

demo.xlsx

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