summaryrefslogtreecommitdiff
path: root/col.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-06-29 22:26:55 +0800
committerxuri <xuri.me@gmail.com>2021-06-29 22:26:55 +0800
commitf27624acddfb51916e028f421568840595dbad67 (patch)
tree9f12f7104989ddde09eb3581f2c6a5342f5f9f3d /col.go
parent24967a5c25499f92b4e58b8d6f8a92a46a7acc7a (diff)
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
Diffstat (limited to 'col.go')
-rw-r--r--col.go4
1 files changed, 2 insertions, 2 deletions
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 {