-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
File corrupted #587
Comments
Please follow by issue template to provide code/attachments and steps to reproduce the issue. |
Hi @Andrewpqc, I'll close this issue, if the problem was still is gone, please provides more details and reopen this issue. |
Need add content-length header |
@xuri I still encountered this issue. When i open the saved xlsx file, it asks me "发现“员工表.xlsx”中的部分内容有问题。是否让我们尽量尝试恢复?". |
@dingweihua Please follow by issue template to provide code/attachments and steps to reproduce the issue. |
@xuri Here is the full code template which produces the excel file. Could you please dig into it? Thanks!
|
Hi @dingweihua, file corrupted caused by missing if err = f.SetPanes(defaultSheet, `{"freeze":true,"split": false,"x_split":0,"y_split":`+strconv.Itoa(titleLineNum+1)+`,"top_left_cell":"A3"}`); err != nil {
panic(err)
} |
@xuri Yes, it's fixed! Thanks very much! |
`package main import (
) func main() { official example has the same problem.I have no idea , please help @xuri |
Hi @MrWrong77, which version of the Excelize library and Go language version are you using? |
go 1.21.0 excelize 2.80 & 2.4.1 |
@xuri I encountered the same issue, I generate a excel file, and it can open on WPS, but report the same warning just like the picture when open it on microsoft excel. go version go1.21.11 linux/amd64 code:
} could you please help me solve this issue... |
Hi @haiyang-zeng. Thanks for your feedback. Could you show us a complete, standalone example program with main function or reproducible demo? |
`func WriteToExcel(data []map[string]any) (*excelize.File, error) {
} func main() {
} |
Hi @haiyang-zeng, I tested your code, and it works well. Please show us a reproducible demo. |
`func WriteToExcel(w http.ResponseWriter, r *http.Request) {
} func main() { I run this code, and the file can open with Microsoft excel, but I use the company self developed go framework in project to realize the function, so I can't ensure if it's caused by this |
it's works well use raw go framework, but seems not good in self developed go framework.... |
Sorry, I can't confirm that the issue related with this library. |
I see, doesn't matter, thanks for you reply. |
求助Issue,没按照issue格式来。excel生成后打开发现“xxx.xlsx”中的部分内容有问题。是否让我们尽量尝试恢复? 如果您信任此工作簿的源,请单击“是” 是什么原因?有人遇到过吗?
The text was updated successfully, but these errors were encountered: