From ec37b114c3b704a84c66fcf3e135c9df88ffb24d Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 6 Aug 2018 10:21:24 +0800 Subject: Fixes #256 and format document. --- col.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index 05ad0cc..e3870ee 100644 --- a/col.go +++ b/col.go @@ -121,8 +121,8 @@ func (f *File) SetColOutlineLevel(sheet, column string, level uint8) { xlsx.Cols.Col = append(xlsx.Cols.Col, col) } -// SetColWidth provides function to set the width of a single column or multiple -// columns. For example: +// SetColWidth provides a function to set the width of a single column or +// multiple columns. For example: // // xlsx := excelize.NewFile() // xlsx.SetColWidth("Sheet1", "A", "H", 20) @@ -259,8 +259,8 @@ func (f *File) positionObjectPixels(sheet string, colStart, rowStart, x1, y1, wi return colStart, rowStart, xAbs, yAbs, colEnd, rowEnd, x2, y2 } -// getColWidth provides function to get column width in pixels by given sheet -// name and column index. +// getColWidth provides a function to get column width in pixels by given +// sheet name and column index. func (f *File) getColWidth(sheet string, col int) int { xlsx := f.workSheetReader(sheet) if xlsx.Cols != nil { @@ -278,8 +278,8 @@ func (f *File) getColWidth(sheet string, col int) int { return int(defaultColWidthPixels) } -// GetColWidth provides function to get column width by given worksheet name and -// column index. +// GetColWidth provides a function to get column width by given worksheet name +// and column index. func (f *File) GetColWidth(sheet, column string) float64 { col := TitleToNumber(strings.ToUpper(column)) + 1 xlsx := f.workSheetReader(sheet) @@ -298,8 +298,8 @@ func (f *File) GetColWidth(sheet, column string) float64 { return defaultColWidthPixels } -// InsertCol provides function to insert a new column before given column index. -// For example, create a new column before column C in Sheet1: +// InsertCol provides a function to insert a new column before given column +// index. For example, create a new column before column C in Sheet1: // // xlsx.InsertCol("Sheet1", "C") // @@ -308,8 +308,8 @@ func (f *File) InsertCol(sheet, column string) { f.adjustHelper(sheet, col, -1, 1) } -// RemoveCol provides function to remove single column by given worksheet name -// and column index. For example, remove column C in Sheet1: +// RemoveCol provides a function to remove single column by given worksheet +// name and column index. For example, remove column C in Sheet1: // // xlsx.RemoveCol("Sheet1", "C") // @@ -346,10 +346,10 @@ func completeCol(xlsx *xlsxWorksheet, row, cell int) { } } -// convertColWidthToPixels provieds function to convert the width of a cell from -// user's units to pixels. Excel rounds the column width to the nearest pixel. -// If the width hasn't been set by the user we use the default value. If the -// column is hidden it has a value of zero. +// convertColWidthToPixels provieds function to convert the width of a cell +// from user's units to pixels. Excel rounds the column width to the nearest +// pixel. If the width hasn't been set by the user we use the default value. +// If the column is hidden it has a value of zero. func convertColWidthToPixels(width float64) float64 { var padding float64 = 5 var pixels float64 -- cgit v1.2.1 From b4a6e61ec34d4a0db1110907cc969f0d7d38991a Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 12 Sep 2018 15:47:56 +0800 Subject: Fix golint errors under confidence 0.1 --- col.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'col.go') diff --git a/col.go b/col.go index e3870ee..cddb09f 100644 --- a/col.go +++ b/col.go @@ -1,3 +1,11 @@ +// Package excelize providing a set of functions that allow you to write to +// and read from XLSX files. Support reads and writes XLSX file generated by +// Microsoft Excel™ 2007 and later. Support save file without losing original +// charts of XLSX. This library needs Go version 1.8 or later. +// +// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// this source code is governed by a BSD-style license that can be found in +// the LICENSE file. package excelize import ( -- cgit v1.2.1 From 2f146c923ccd19c5ecc1f732b5b09d591fb935a3 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 14 Sep 2018 00:35:47 +0800 Subject: Comments style changed. --- col.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index cddb09f..a2d7e69 100644 --- a/col.go +++ b/col.go @@ -1,11 +1,13 @@ -// Package excelize providing a set of functions that allow you to write to -// and read from XLSX files. Support reads and writes XLSX file generated by -// Microsoft Excel™ 2007 and later. Support save file without losing original -// charts of XLSX. This library needs Go version 1.8 or later. -// -// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of -// this source code is governed by a BSD-style license that can be found in -// the LICENSE file. +/* +Package excelize providing a set of functions that allow you to write to +and read from XLSX files. Support reads and writes XLSX file generated by +Microsoft Excel™ 2007 and later. Support save file without losing original +charts of XLSX. This library needs Go version 1.8 or later. + +Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +this source code is governed by a BSD-style license that can be found in +the LICENSE file. +*/ package excelize import ( -- cgit v1.2.1 From 13a9769cc5bde486c52d8e45661ff8108cd786ae Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 14 Sep 2018 00:44:23 +0800 Subject: Comments style changed. --- col.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index a2d7e69..c7ab9e3 100644 --- a/col.go +++ b/col.go @@ -1,13 +1,11 @@ -/* -Package excelize providing a set of functions that allow you to write to -and read from XLSX files. Support reads and writes XLSX file generated by -Microsoft Excel™ 2007 and later. Support save file without losing original -charts of XLSX. This library needs Go version 1.8 or later. - -Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of -this source code is governed by a BSD-style license that can be found in -the LICENSE file. -*/ +// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// this source code is governed by a BSD-style license that can be found in +// the LICENSE file. +// +// Package excelize providing a set of functions that allow you to write to +// and read from XLSX files. Support reads and writes XLSX file generated by +// Microsoft Excel™ 2007 and later. Support save file without losing original +// charts of XLSX. This library needs Go version 1.8 or later. package excelize import ( -- cgit v1.2.1 From 3e004d900b103379c2d62657a3070de4a2e8585a Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 14 Sep 2018 00:58:48 +0800 Subject: Comments style changed. --- col.go | 1 + 1 file changed, 1 insertion(+) (limited to 'col.go') diff --git a/col.go b/col.go index c7ab9e3..32cda12 100644 --- a/col.go +++ b/col.go @@ -6,6 +6,7 @@ // and read from XLSX files. Support reads and writes XLSX file generated by // Microsoft Excel™ 2007 and later. Support save file without losing original // charts of XLSX. This library needs Go version 1.8 or later. + package excelize import ( -- cgit v1.2.1