excelize
excelize copied to clipboard
Is there any possible GetCellFormula faster?
Description A sheet which has 4600 rows and 55 cols, and some cols have formulas,I want to get them,it seems no problem but the time cost is very large,I want to know whether excelize can solve this.
here is demo code and file
func TestGetFormulas(t *testing.T) {
file, err := excelize.OpenFile("4600Formulas.xlsx")
if err != nil {
panic(err)
}
begin := time.Now()
for col := 0; col < 55; col++ {
for row := 0; row < 4600; row++ {
axis := AxisEncode(col, row)
_, err := file.GetCellFormula("Sheet1", axis)
if err != nil {
panic(err)
}
}
}
fmt.Printf("GetCellFormula time cost:%dms", time.Since(begin).Milliseconds())
}