We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The original file size is 8KB, and it contains nothing but only one empty row (row# 1048576), the file size will become 2.8MB when saving. origin.xlsx
Unzipped both files and you can find that the file size of sheet1.xml has increased from 1KB to 23MB.
package main import ( "log" "os" "github.com/xuri/excelize/v2" ) func main() { fi, err := os.Stat("origin.xlsx") if err != nil { log.Fatal(err) } log.Printf("Origin file size: %v", fi.Size()) file, _ := excelize.OpenFile("origin.xlsx") file.SetCellValue("Test", "A1", "test") file.SaveAs("copy.xlsx") fi, _ = os.Stat("copy.xlsx") log.Printf("Copy file size: %v", fi.Size()) }
The output is
Origin file size: 8382 Copy file size: 2759163
The text was updated successfully, but these errors were encountered:
4998b7b
Thanks for your issue, I have fixed it. Please upgrade to the master branch code, and this patch will be released in the next version.
Sorry, something went wrong.
Awesome! Thanks for your efforts!
This closes qax-os#1383, skip empty rows when saving the spreadsheet …
acfe10d
…to reduce file size
de26598
No branches or pull requests
The original file size is 8KB, and it contains nothing but only one empty row (row# 1048576), the file size will become 2.8MB when saving.
origin.xlsx
Unzipped both files and you can find that the file size of sheet1.xml has increased from 1KB to 23MB.
The output is
The text was updated successfully, but these errors were encountered: