From f27624acddfb51916e028f421568840595dbad67 Mon Sep 17 00:00:00 2001 From: xuri Date: Tue, 29 Jun 2021 22:26:55 +0800 Subject: This closes #866, support use the defined name to reference the data range in pivot table options - Fix incorrect scope when getting defined name - Update docs: use column number instead of index on get column width --- col.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index 2e3190c..2fd90b2 100644 --- a/col.go +++ b/col.go @@ -604,7 +604,7 @@ 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 index. +// sheet name and column number. func (f *File) getColWidth(sheet string, col int) int { xlsx, _ := f.workSheetReader(sheet) if xlsx.Cols != nil { @@ -623,7 +623,7 @@ func (f *File) getColWidth(sheet string, col int) int { } // GetColWidth provides a function to get column width by given worksheet name -// and column index. +// and column name. func (f *File) GetColWidth(sheet, col string) (float64, error) { colNum, err := ColumnNameToNumber(col) if err != nil { -- cgit v1.2.1