summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'table.go')
-rw-r--r--table.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/table.go b/table.go
index 643b156..fcc4d3c 100644
--- a/table.go
+++ b/table.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 (
@@ -282,7 +290,7 @@ func (f *File) autoFilter(sheet, ref string, refRange, hxAxis int, formatSet *fo
col := TitleToNumber(formatSet.Column)
offset := col - hxAxis
if offset < 0 || offset > refRange {
- return fmt.Errorf("Incorrect index of column '%s'", formatSet.Column)
+ return fmt.Errorf("incorrect index of column '%s'", formatSet.Column)
}
filter.FilterColumn = &xlsxFilterColumn{
ColID: offset,
@@ -290,7 +298,7 @@ func (f *File) autoFilter(sheet, ref string, refRange, hxAxis int, formatSet *fo
re := regexp.MustCompile(`"(?:[^"]|"")*"|\S+`)
token := re.FindAllString(formatSet.Expression, -1)
if len(token) != 3 && len(token) != 7 {
- return fmt.Errorf("Incorrect number of tokens in criteria '%s'", formatSet.Expression)
+ return fmt.Errorf("incorrect number of tokens in criteria '%s'", formatSet.Expression)
}
expressions, tokens, err := f.parseFilterExpression(formatSet.Expression, token)
if err != nil {
@@ -415,7 +423,7 @@ func (f *File) parseFilterTokens(expression string, tokens []string) ([]int, str
operator, ok := operators[strings.ToLower(tokens[1])]
if !ok {
// Convert the operator from a number to a descriptive string.
- return []int{}, "", fmt.Errorf("Unknown operator: %s", tokens[1])
+ return []int{}, "", fmt.Errorf("unknown operator: %s", tokens[1])
}
token := tokens[2]
// Special handling for Blanks/NonBlanks.
@@ -423,7 +431,7 @@ func (f *File) parseFilterTokens(expression string, tokens []string) ([]int, str
if re {
// Only allow Equals or NotEqual in this context.
if operator != 2 && operator != 5 {
- return []int{operator}, token, fmt.Errorf("The operator '%s' in expression '%s' is not valid in relation to Blanks/NonBlanks'", tokens[1], expression)
+ return []int{operator}, token, fmt.Errorf("the operator '%s' in expression '%s' is not valid in relation to Blanks/NonBlanks'", tokens[1], expression)
}
token = strings.ToLower(token)
// The operator should always be 2 (=) to flag a "simple" equality in