From f6f14f507ee1adf4883cb1b12f27932a63afb286 Mon Sep 17 00:00:00 2001 From: three Date: Fri, 13 Aug 2021 01:32:44 +0800 Subject: Speed up merge cells --- col.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index 088fac9..7fbeeba 100644 --- a/col.go +++ b/col.go @@ -616,10 +616,10 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh // getColWidth provides a function to get column width in pixels by given // sheet name and column number. func (f *File) getColWidth(sheet string, col int) int { - xlsx, _ := f.workSheetReader(sheet) - if xlsx.Cols != nil { + ws, _ := f.workSheetReader(sheet) + if ws.Cols != nil { var width float64 - for _, v := range xlsx.Cols.Col { + for _, v := range ws.Cols.Col { if v.Min <= col && col <= v.Max { width = v.Width } -- cgit v1.2.1