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

excel broken when create new file #186

Closed
shawnye opened this issue Feb 10, 2018 · 2 comments
Closed

excel broken when create new file #186

shawnye opened this issue Feb 10, 2018 · 2 comments

Comments

@shawnye
Copy link

shawnye commented Feb 10, 2018

Description

Excel broken when create new file

Steps to reproduce the issue:

xlsx := excelize.NewFile()
xlsx.NewSheet("Sheet1")
xlsx.SaveAs("test.xlsx")

Describe the results you received:
Just trival process, but when open test.xlsx, excel 2013 compained:
发现部分内容有问题,是否让我们尽量尝试修复?

Describe the results you expected:
excel 2013 keep quilt as do before

Output of go version:

go version go1.9.2 windows/amd64

Excelize version or commit ID:

7621927       latest commit

Environment details (OS, Microsoft Excel™ version, physical, etc.):
window 7 professional, excel 2013

@xuri
Copy link
Member

xuri commented Feb 10, 2018

Thanks for your issue. When calling the NewFile() function will automatically create a worksheet named Sheet1, so we needn't call the function NewSheet() when only one worksheet in the workbook. Reference issue #185.

@shawnye
Copy link
Author

shawnye commented Feb 10, 2018

Thank you!
I did not notice the example :<

xlsx := excelize.NewFile()
    // Create a new sheet.
    index := xlsx.NewSheet("**Sheet2**")

@shawnye shawnye closed this as completed Feb 10, 2018
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

2 participants