Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 6665dd0

Browse files
authored
Merge pull request #806 from bradleypeabody/doc-fixes-20240609
2 parents 7b4dc44 + 472402f commit 6665dd0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

col.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Col struct {
2525
// columns in the range min to max (inclusive). Note, in order for
2626
// this Col to do anything useful you must set some of its parameters
2727
// and then apply it to a Sheet by calling sheet.SetColParameters.
28+
// Column numbers start from 1.
2829
func NewColForRange(min, max int) *Col {
2930
if min < 1 {
3031
panic("min col must be >= 1")

sheet.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ func (s *Sheet) Row(idx int) (*Row, error) {
319319
}
320320

321321
// Return the Col that applies to this Column index, or return nil if no such Col exists
322+
// Column numbers start from 1.
322323
func (s *Sheet) Col(idx int) *Col {
323324
s.mustBeOpen()
324325
if s.Cols == nil {
@@ -354,6 +355,7 @@ func (s *Sheet) Cell(row, col int) (*Cell, error) {
354355

355356
// Set the parameters of a column. Parameters are passed as a pointer
356357
// to a Col structure which you much construct yourself.
358+
// Column numbers start from 1.
357359
func (s *Sheet) SetColParameters(col *Col) {
358360
s.mustBeOpen()
359361
if s.Cols == nil {
@@ -410,6 +412,7 @@ func (s *Sheet) setCol(min, max int, setter func(col *Col)) {
410412
}
411413

412414
// Set the width of a range of columns.
415+
// Column numbers start from 1.
413416
func (s *Sheet) SetColWidth(min, max int, width float64) {
414417
s.mustBeOpen()
415418
s.setCol(min, max, func(col *Col) {
@@ -425,6 +428,7 @@ func DefaultAutoWidth(s string) float64 {
425428

426429
// Tries to guess the best width for a column, based on the largest
427430
// cell content. A scale function needs to be provided.
431+
// Column numbers start from 1.
428432
func (s *Sheet) SetColAutoWidth(colIndex int, width func(string) float64) error {
429433
s.mustBeOpen()
430434
largestWidth := 0.0

0 commit comments

Comments
 (0)