diff --git a/go.mod b/go.mod
index c9decce3..aeaa5a50 100644
--- a/go.mod
+++ b/go.mod
@@ -2,7 +2,7 @@ module github.com/atc0005/bridge
go 1.19
-require github.com/xuri/excelize/v2 v2.8.1
+require github.com/xuri/excelize/v2 v2.9.0
require (
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
diff --git a/go.sum b/go.sum
index 288324f7..a829d0ec 100644
--- a/go.sum
+++ b/go.sum
@@ -10,13 +10,13 @@ github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTK
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
-github.com/xuri/excelize/v2 v2.8.1 h1:pZLMEwK8ep+CLIUWpWmvW8IWE/yxqG0I1xcN6cVMGuQ=
-github.com/xuri/excelize/v2 v2.8.1/go.mod h1:oli1E4C3Pa5RXg1TBXn4ENCXDV5JUMlBluUhG7c+CEE=
+github.com/xuri/excelize/v2 v2.9.0 h1:1tgOaEq92IOEumR1/JfYS/eR0KHOCsRv/rYXXh6YJQE=
+github.com/xuri/excelize/v2 v2.9.0/go.mod h1:uqey4QBZ9gdMeWApPLdhm9x+9o2lq4iVmjiLfBS5hdE=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
-golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
+golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
diff --git a/vendor/github.com/xuri/excelize/v2/adjust.go b/vendor/github.com/xuri/excelize/v2/adjust.go
index 5d600406..ab97c435 100644
--- a/vendor/github.com/xuri/excelize/v2/adjust.go
+++ b/vendor/github.com/xuri/excelize/v2/adjust.go
@@ -201,13 +201,13 @@ func (f *File) adjustRowDimensions(sheet string, ws *xlsxWorksheet, row, offset
return nil
}
lastRow := &ws.SheetData.Row[totalRows-1]
- if newRow := *lastRow.R + offset; *lastRow.R >= row && newRow > 0 && newRow > TotalRows {
+ if newRow := lastRow.R + offset; lastRow.R >= row && newRow > 0 && newRow > TotalRows {
return ErrMaxRows
}
numOfRows := len(ws.SheetData.Row)
for i := 0; i < numOfRows; i++ {
r := &ws.SheetData.Row[i]
- if newRow := *r.R + offset; *r.R >= row && newRow > 0 {
+ if newRow := r.R + offset; r.R >= row && newRow > 0 {
r.adjustSingleRowDimensions(offset)
}
if err := f.adjustSingleRowFormulas(sheet, sheet, r, row, offset, false); err != nil {
@@ -219,10 +219,10 @@ func (f *File) adjustRowDimensions(sheet string, ws *xlsxWorksheet, row, offset
// adjustSingleRowDimensions provides a function to adjust single row dimensions.
func (r *xlsxRow) adjustSingleRowDimensions(offset int) {
- r.R = intPtr(*r.R + offset)
+ r.R += offset
for i, col := range r.C {
colName, _, _ := SplitCellName(col.R)
- r.C[i].R, _ = JoinCellName(colName, *r.R)
+ r.C[i].R, _ = JoinCellName(colName, r.R)
}
}
@@ -237,38 +237,44 @@ func (f *File) adjustSingleRowFormulas(sheet, sheetN string, r *xlsxRow, num, of
}
// adjustCellRef provides a function to adjust cell reference.
-func (f *File) adjustCellRef(ref string, dir adjustDirection, num, offset int) (string, bool, error) {
- if !strings.Contains(ref, ":") {
- ref += ":" + ref
- }
- var delete bool
- coordinates, err := rangeRefToCoordinates(ref)
- if err != nil {
- return ref, delete, err
- }
- if dir == columns {
- if offset < 0 && coordinates[0] == coordinates[2] {
- delete = true
- }
- if coordinates[0] >= num {
- coordinates[0] += offset
+func (f *File) adjustCellRef(cellRef string, dir adjustDirection, num, offset int) (string, error) {
+ var SQRef []string
+ applyOffset := func(coordinates []int, idx1, idx2, maxVal int) []int {
+ if coordinates[idx1] >= num {
+ coordinates[idx1] += offset
+ }
+ if coordinates[idx2] >= num {
+ if coordinates[idx2] += offset; coordinates[idx2] > maxVal {
+ coordinates[idx2] = maxVal
+ }
}
- if coordinates[2] >= num {
- coordinates[2] += offset
+ return coordinates
+ }
+ for _, ref := range strings.Split(cellRef, " ") {
+ if !strings.Contains(ref, ":") {
+ ref += ":" + ref
}
- } else {
- if offset < 0 && coordinates[1] == coordinates[3] {
- delete = true
+ coordinates, err := rangeRefToCoordinates(ref)
+ if err != nil {
+ return "", err
}
- if coordinates[1] >= num {
- coordinates[1] += offset
+ if dir == columns {
+ if offset < 0 && coordinates[0] == coordinates[2] && num == coordinates[0] {
+ continue
+ }
+ coordinates = applyOffset(coordinates, 0, 2, MaxColumns)
+ } else {
+ if offset < 0 && coordinates[1] == coordinates[3] && num == coordinates[1] {
+ continue
+ }
+ coordinates = applyOffset(coordinates, 1, 3, TotalRows)
}
- if coordinates[3] >= num {
- coordinates[3] += offset
+ if ref, err = coordinatesToRangeRef(coordinates); err != nil {
+ return "", err
}
+ SQRef = append(SQRef, ref)
}
- ref, err = f.coordinatesToRangeRef(coordinates)
- return ref, delete, err
+ return strings.Join(SQRef, " "), nil
}
// adjustFormula provides a function to adjust formula reference and shared
@@ -284,7 +290,7 @@ func (f *File) adjustFormula(sheet, sheetN string, cell *xlsxC, dir adjustDirect
return nil
}
if cell.F.Ref != "" && sheet == sheetN {
- if cell.F.Ref, _, err = f.adjustCellRef(cell.F.Ref, dir, num, offset); err != nil {
+ if cell.F.Ref, err = f.adjustCellRef(cell.F.Ref, dir, num, offset); err != nil {
return err
}
if si && cell.F.Si != nil {
@@ -320,7 +326,9 @@ func adjustFormulaColumnName(name, operand string, abs, keepRelative bool, dir a
return "", operand, false, err
}
if dir == columns && col >= num {
- col += offset
+ if col += offset; col < 1 {
+ col = 1
+ }
colName, err := ColumnNumberToName(col)
return "", operand + colName, false, err
}
@@ -334,8 +342,10 @@ func adjustFormulaRowNumber(name, operand string, abs, keepRelative bool, dir ad
}
row, _ := strconv.Atoi(name)
if dir == rows && row >= num {
- row += offset
- if row <= 0 || row > TotalRows {
+ if row += offset; row < 1 {
+ row = 1
+ }
+ if row > TotalRows {
return "", operand + name, false, ErrMaxRows
}
return "", operand + strconv.Itoa(row), false, nil
@@ -437,12 +447,8 @@ func (f *File) adjustFormulaRef(sheet, sheetN, formula string, keepRelative bool
val += operand
continue
}
- if isFunctionStartToken(token) {
- val += token.TValue + string(efp.ParenOpen)
- continue
- }
- if isFunctionStopToken(token) {
- val += token.TValue + string(efp.ParenClose)
+ if paren := transformParenthesesToken(token); paren != "" {
+ val += transformParenthesesToken(token)
continue
}
if token.TType == efp.TokenTypeOperand && token.TSubType == efp.TokenSubTypeText {
@@ -454,6 +460,18 @@ func (f *File) adjustFormulaRef(sheet, sheetN, formula string, keepRelative bool
return val, nil
}
+// transformParenthesesToken returns formula part with parentheses by given
+// token.
+func transformParenthesesToken(token efp.Token) string {
+ if isFunctionStartToken(token) || isBeginParenthesesToken(token) {
+ return token.TValue + string(efp.ParenOpen)
+ }
+ if isFunctionStopToken(token) || isEndParenthesesToken(token) {
+ return token.TValue + string(efp.ParenClose)
+ }
+ return ""
+}
+
// adjustRangeSheetName returns replaced range reference by given source and
// target sheet name.
func adjustRangeSheetName(rng, source, target string) string {
@@ -542,12 +560,8 @@ func transformArrayFormula(tokens []efp.Token, afs []arrayFormulaOperandToken) s
if skip {
continue
}
- if isFunctionStartToken(token) {
- val += token.TValue + string(efp.ParenOpen)
- continue
- }
- if isFunctionStopToken(token) {
- val += token.TValue + string(efp.ParenClose)
+ if paren := transformParenthesesToken(token); paren != "" {
+ val += transformParenthesesToken(token)
continue
}
if token.TType == efp.TokenTypeOperand && token.TSubType == efp.TokenSubTypeText {
@@ -662,7 +676,7 @@ func (f *File) adjustTable(ws *xlsxWorksheet, sheet string, dir adjustDirection,
idx--
continue
}
- t.Ref, _ = f.coordinatesToRangeRef([]int{x1, y1, x2, y2})
+ t.Ref, _ = coordinatesToRangeRef([]int{x1, y1, x2, y2})
if t.AutoFilter != nil {
t.AutoFilter.Ref = t.Ref
}
@@ -692,7 +706,7 @@ func (f *File) adjustAutoFilter(ws *xlsxWorksheet, sheet string, dir adjustDirec
ws.AutoFilter = nil
for rowIdx := range ws.SheetData.Row {
rowData := &ws.SheetData.Row[rowIdx]
- if rowData.R != nil && *rowData.R > y1 && *rowData.R <= y2 {
+ if rowData.R > y1 && rowData.R <= y2 {
rowData.Hidden = false
}
}
@@ -702,7 +716,7 @@ func (f *File) adjustAutoFilter(ws *xlsxWorksheet, sheet string, dir adjustDirec
coordinates = f.adjustAutoFilterHelper(dir, coordinates, num, offset)
x1, y1, x2, y2 = coordinates[0], coordinates[1], coordinates[2], coordinates[3]
- ws.AutoFilter.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2})
+ ws.AutoFilter.Ref, err = coordinatesToRangeRef([]int{x1, y1, x2, y2})
return err
}
@@ -769,7 +783,7 @@ func (f *File) adjustMergeCells(ws *xlsxWorksheet, sheet string, dir adjustDirec
continue
}
mergedCells.rect = []int{x1, y1, x2, y2}
- if mergedCells.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2}); err != nil {
+ if mergedCells.Ref, err = coordinatesToRangeRef([]int{x1, y1, x2, y2}); err != nil {
return err
}
}
@@ -928,11 +942,11 @@ func (f *File) adjustConditionalFormats(ws *xlsxWorksheet, sheet string, dir adj
if cf == nil {
continue
}
- ref, del, err := f.adjustCellRef(cf.SQRef, dir, num, offset)
+ ref, err := f.adjustCellRef(cf.SQRef, dir, num, offset)
if err != nil {
return err
}
- if del {
+ if ref == "" {
ws.ConditionalFormatting = append(ws.ConditionalFormatting[:i],
ws.ConditionalFormatting[i+1:]...)
i--
@@ -963,11 +977,11 @@ func (f *File) adjustDataValidations(ws *xlsxWorksheet, sheet string, dir adjust
continue
}
if sheet == sheetN {
- ref, del, err := f.adjustCellRef(dv.Sqref, dir, num, offset)
+ ref, err := f.adjustCellRef(dv.Sqref, dir, num, offset)
if err != nil {
return err
}
- if del {
+ if ref == "" {
worksheet.DataValidations.DataValidation = append(worksheet.DataValidations.DataValidation[:i],
worksheet.DataValidations.DataValidation[i+1:]...)
i--
@@ -975,15 +989,15 @@ func (f *File) adjustDataValidations(ws *xlsxWorksheet, sheet string, dir adjust
}
worksheet.DataValidations.DataValidation[i].Sqref = ref
}
- if worksheet.DataValidations.DataValidation[i].Formula1 != nil {
- formula := unescapeDataValidationFormula(worksheet.DataValidations.DataValidation[i].Formula1.Content)
+ if worksheet.DataValidations.DataValidation[i].Formula1.isFormula() {
+ formula := formulaUnescaper.Replace(worksheet.DataValidations.DataValidation[i].Formula1.Content)
if formula, err = f.adjustFormulaRef(sheet, sheetN, formula, false, dir, num, offset); err != nil {
return err
}
worksheet.DataValidations.DataValidation[i].Formula1 = &xlsxInnerXML{Content: formulaEscaper.Replace(formula)}
}
- if worksheet.DataValidations.DataValidation[i].Formula2 != nil {
- formula := unescapeDataValidationFormula(worksheet.DataValidations.DataValidation[i].Formula2.Content)
+ if worksheet.DataValidations.DataValidation[i].Formula2.isFormula() {
+ formula := formulaUnescaper.Replace(worksheet.DataValidations.DataValidation[i].Formula2.Content)
if formula, err = f.adjustFormulaRef(sheet, sheetN, formula, false, dir, num, offset); err != nil {
return err
}
diff --git a/vendor/github.com/xuri/excelize/v2/calc.go b/vendor/github.com/xuri/excelize/v2/calc.go
index 496ecd41..9784ea60 100644
--- a/vendor/github.com/xuri/excelize/v2/calc.go
+++ b/vendor/github.com/xuri/excelize/v2/calc.go
@@ -478,6 +478,7 @@ type formulaFuncs struct {
// DISC
// DMAX
// DMIN
+// DOLLAR
// DOLLARDE
// DOLLARFR
// DPRODUCT
@@ -831,8 +832,8 @@ func (f *File) CalcCellValue(sheet, cell string, opts ...Options) (result string
if !rawCellValue {
styleIdx, _ = f.GetCellStyle(sheet, cell)
}
- result = token.Value()
- if isNum, precision, decimal := isNumeric(result); isNum && !rawCellValue {
+ if token.Type == ArgNumber && !token.Boolean {
+ _, precision, decimal := isNumeric(token.Value())
if precision > 15 {
result, err = f.formattedValue(&xlsxC{S: styleIdx, V: strings.ToUpper(strconv.FormatFloat(decimal, 'G', 15, 64))}, rawCellValue, CellTypeNumber)
return
@@ -840,7 +841,9 @@ func (f *File) CalcCellValue(sheet, cell string, opts ...Options) (result string
if !strings.HasPrefix(result, "0") {
result, err = f.formattedValue(&xlsxC{S: styleIdx, V: strings.ToUpper(strconv.FormatFloat(decimal, 'f', -1, 64))}, rawCellValue, CellTypeNumber)
}
+ return
}
+ result, err = f.formattedValue(&xlsxC{S: styleIdx, V: token.Value()}, rawCellValue, CellTypeInlineString)
return
}
@@ -4281,7 +4284,7 @@ func (fn *formulaFuncs) EXP(argsList *list.List) formulaArg {
if number.Type == ArgError {
return number
}
- return newStringFormulaArg(strings.ToUpper(fmt.Sprintf("%g", math.Exp(number.Number))))
+ return newNumberFormulaArg(math.Exp(number.Number))
}
// fact returns the factorial of a supplied number.
@@ -4359,7 +4362,7 @@ func (fn *formulaFuncs) FLOOR(argsList *list.List) formulaArg {
val--
}
}
- return newStringFormulaArg(strings.ToUpper(fmt.Sprintf("%g", val*significance.Number)))
+ return newNumberFormulaArg(val * significance.Number)
}
// FLOORdotMATH function rounds a supplied number down to a supplied multiple
@@ -11570,12 +11573,10 @@ func (fn *formulaFuncs) ISNA(argsList *list.List) formulaArg {
if argsList.Len() != 1 {
return newErrorFormulaArg(formulaErrorVALUE, "ISNA requires 1 argument")
}
- token := argsList.Front().Value.(formulaArg)
- result := "FALSE"
- if token.Type == ArgError && token.String == formulaErrorNA {
- result = "TRUE"
+ if token := argsList.Front().Value.(formulaArg); token.Type == ArgError && token.String == formulaErrorNA {
+ return newBoolFormulaArg(true)
}
- return newStringFormulaArg(result)
+ return newBoolFormulaArg(false)
}
// ISNONTEXT function tests if a supplied value is text. If not, the
@@ -11602,7 +11603,22 @@ func (fn *formulaFuncs) ISNUMBER(argsList *list.List) formulaArg {
if argsList.Len() != 1 {
return newErrorFormulaArg(formulaErrorVALUE, "ISNUMBER requires 1 argument")
}
- if argsList.Front().Value.(formulaArg).Type == ArgNumber {
+ arg := argsList.Front().Value.(formulaArg)
+ if arg.Type == ArgMatrix {
+ var mtx [][]formulaArg
+ for _, row := range arg.Matrix {
+ var array []formulaArg
+ for _, val := range row {
+ if val.Type == ArgNumber {
+ array = append(array, newBoolFormulaArg(true))
+ }
+ array = append(array, newBoolFormulaArg(false))
+ }
+ mtx = append(mtx, array)
+ }
+ return newMatrixFormulaArg(mtx)
+ }
+ if arg.Type == ArgNumber {
return newBoolFormulaArg(true)
}
return newBoolFormulaArg(false)
@@ -11951,11 +11967,14 @@ func (fn *formulaFuncs) OR(argsList *list.List) formulaArg {
return newStringFormulaArg(strings.ToUpper(strconv.FormatBool(or)))
}
case ArgMatrix:
- // TODO
- return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
+ args := list.New()
+ for _, arg := range token.ToList() {
+ args.PushBack(arg)
+ }
+ return fn.OR(args)
}
}
- return newStringFormulaArg(strings.ToUpper(strconv.FormatBool(or)))
+ return newBoolFormulaArg(or)
}
// SWITCH function compares a number of supplied values to a supplied test
@@ -12063,7 +12082,7 @@ func (fn *formulaFuncs) DATE(argsList *list.List) formulaArg {
return newErrorFormulaArg(formulaErrorVALUE, "DATE requires 3 number arguments")
}
d := makeDate(int(year.Number), time.Month(month.Number), int(day.Number))
- return newStringFormulaArg(timeFromExcelTime(daysBetween(excelMinTime1900.Unix(), d)+1, false).String())
+ return newNumberFormulaArg(daysBetween(excelMinTime1900.Unix(), d) + 1)
}
// calcDateDif is an implementation of the formula function DATEDIF,
@@ -13741,34 +13760,48 @@ func (fn *formulaFuncs) find(name string, argsList *list.List) formulaArg {
if args.Type != ArgList {
return args
}
- findText := argsList.Front().Value.(formulaArg).Value()
+ findTextArg := argsList.Front().Value.(formulaArg)
withinText := argsList.Front().Next().Value.(formulaArg).Value()
startNum := int(args.List[0].Number)
- if findText == "" {
- return newNumberFormulaArg(float64(startNum))
- }
dbcs, search := name == "FINDB" || name == "SEARCHB", name == "SEARCH" || name == "SEARCHB"
- if search {
- findText, withinText = strings.ToUpper(findText), strings.ToUpper(withinText)
- }
- offset, ok := matchPattern(findText, withinText, dbcs, startNum)
- if !ok {
- return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
- }
- result := offset
- if dbcs {
- var pre int
- for idx := range withinText {
- if pre > offset {
- break
+ find := func(findText string) formulaArg {
+ if findText == "" {
+ return newNumberFormulaArg(float64(startNum))
+ }
+ if search {
+ findText, withinText = strings.ToUpper(findText), strings.ToUpper(withinText)
+ }
+ offset, ok := matchPattern(findText, withinText, dbcs, startNum)
+ if !ok {
+ return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
+ }
+ result := offset
+ if dbcs {
+ var pre int
+ for idx := range withinText {
+ if pre > offset {
+ break
+ }
+ if idx-pre > 1 {
+ result++
+ }
+ pre = idx
}
- if idx-pre > 1 {
- result++
+ }
+ return newNumberFormulaArg(float64(result))
+ }
+ if findTextArg.Type == ArgMatrix {
+ var mtx [][]formulaArg
+ for _, row := range findTextArg.Matrix {
+ var array []formulaArg
+ for _, findText := range row {
+ array = append(array, find(findText.Value()))
}
- pre = idx
+ mtx = append(mtx, array)
}
+ return newMatrixFormulaArg(mtx)
}
- return newNumberFormulaArg(float64(result))
+ return find(findTextArg.Value())
}
// LEFT function returns a specified number of characters from the start of a
@@ -14427,7 +14460,7 @@ func (fn *formulaFuncs) VALUE(argsList *list.List) formulaArg {
value, _ := decimal.Float64()
return newNumberFormulaArg(value * percent)
}
- dateValue, timeValue, errTime, errDate := 0.0, 0.0, false, false
+ dateValue, timeValue, errTime := 0.0, 0.0, false
if !isDateOnlyFmt(text) {
h, m, s, _, _, err := strToTime(text)
errTime = err.Type == ArgError
@@ -14436,7 +14469,7 @@ func (fn *formulaFuncs) VALUE(argsList *list.List) formulaArg {
}
}
y, m, d, _, err := strToDate(text)
- errDate = err.Type == ArgError
+ errDate := err.Type == ArgError
if !errDate {
dateValue = daysBetween(excelMinTime1900.Unix(), makeDate(y, time.Month(m), d)) + 1
}
@@ -16309,6 +16342,49 @@ func (fn *formulaFuncs) DISC(argsList *list.List) formulaArg {
return fn.discIntrate("DISC", argsList)
}
+// DOLLAR function rounds a supplied number to a specified number of decimal
+// places and then converts this into a text string with a currency format. The
+// syntax of the function is:
+//
+// DOLLAR(number,[decimals])
+func (fn *formulaFuncs) DOLLAR(argsList *list.List) formulaArg {
+ if argsList.Len() == 0 {
+ return newErrorFormulaArg(formulaErrorVALUE, "DOLLAR requires at least 1 argument")
+ }
+ if argsList.Len() > 2 {
+ return newErrorFormulaArg(formulaErrorVALUE, "DOLLAR requires 1 or 2 arguments")
+ }
+ numArg := argsList.Front().Value.(formulaArg)
+ n := numArg.ToNumber()
+ if n.Type != ArgNumber {
+ return n
+ }
+ decimals, dot, value := 2, ".", numArg.Value()
+ if argsList.Len() == 2 {
+ d := argsList.Back().Value.(formulaArg).ToNumber()
+ if d.Type != ArgNumber {
+ return d
+ }
+ if d.Number < 0 {
+ value = strconv.FormatFloat(fn.round(n.Number, d.Number, down), 'f', -1, 64)
+ }
+ if d.Number >= 128 {
+ return newErrorFormulaArg(formulaErrorVALUE, "decimal value should be less than 128")
+ }
+ if decimals = int(d.Number); decimals < 0 {
+ decimals, dot = 0, ""
+ }
+ }
+ symbol := map[CultureName]string{
+ CultureNameUnknown: "$",
+ CultureNameEnUS: "$",
+ CultureNameZhCN: "¥",
+ }[fn.f.options.CultureInfo]
+ numFmtCode := fmt.Sprintf("%s#,##0%s%s;(%s#,##0%s%s)",
+ symbol, dot, strings.Repeat("0", decimals), symbol, dot, strings.Repeat("0", decimals))
+ return newStringFormulaArg(format(value, numFmtCode, false, CellTypeNumber, nil))
+}
+
// DOLLARDE function converts a dollar value in fractional notation, into a
// dollar value expressed as a decimal. The syntax of the function is:
//
@@ -18165,28 +18241,26 @@ func (fn *formulaFuncs) prepareXArgs(values, dates formulaArg) (valuesArg, dates
valuesArg = append(valuesArg, numArg.Number)
continue
}
- err = newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM)
+ err = newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
return
}
if len(valuesArg) < 2 {
err = newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM)
return
}
- args, date := list.New(), 0.0
+ date := 0.0
for _, arg := range dates.ToList() {
- args.Init()
- args.PushBack(arg)
- dateValue := fn.DATEVALUE(args)
- if dateValue.Type != ArgNumber {
- err = newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM)
- return
- }
- if dateValue.Number < date {
- err = newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
- return
+ if arg.Type == ArgNumber {
+ datesArg = append(datesArg, arg.Number)
+ if arg.Number < date {
+ err = newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
+ return
+ }
+ date = arg.Number
+ continue
}
- datesArg = append(datesArg, dateValue.Number)
- date = dateValue.Number
+ err = newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
+ return
}
if len(valuesArg) != len(datesArg) {
err = newErrorFormulaArg(formulaErrorNUM, formulaErrorNUM)
diff --git a/vendor/github.com/xuri/excelize/v2/cell.go b/vendor/github.com/xuri/excelize/v2/cell.go
index 5d547e81..7f601d37 100644
--- a/vendor/github.com/xuri/excelize/v2/cell.go
+++ b/vendor/github.com/xuri/excelize/v2/cell.go
@@ -15,6 +15,7 @@ import (
"bytes"
"encoding/xml"
"fmt"
+ "math"
"os"
"reflect"
"strconv"
@@ -143,7 +144,7 @@ func (f *File) SetCellValue(sheet, cell string, value interface{}) error {
if err != nil {
return err
}
- err = f.setDefaultTimeStyle(sheet, cell, 21)
+ err = f.setDefaultTimeStyle(sheet, cell, getDurationNumFmt(v))
case time.Time:
err = f.setCellTimeFunc(sheet, cell, v)
case bool:
@@ -255,7 +256,7 @@ func (f *File) setCellTimeFunc(sheet, cell string, value time.Time) error {
return err
}
if isNum {
- _ = f.setDefaultTimeStyle(sheet, cell, 22)
+ _ = f.setDefaultTimeStyle(sheet, cell, getTimeNumFmt(value))
}
return err
}
@@ -385,6 +386,9 @@ func setCellBool(value bool) (t string, v string) {
// var x float32 = 1.325
// f.SetCellFloat("Sheet1", "A1", float64(x), 2, 32)
func (f *File) SetCellFloat(sheet, cell string, value float64, precision, bitSize int) error {
+ if math.IsNaN(value) || math.IsInf(value, 0) {
+ return f.SetCellStr(sheet, cell, fmt.Sprint(value))
+ }
f.mu.Lock()
ws, err := f.workSheetReader(sheet)
if err != nil {
@@ -399,16 +403,19 @@ func (f *File) SetCellFloat(sheet, cell string, value float64, precision, bitSiz
return err
}
c.S = ws.prepareCellStyle(col, row, c.S)
- c.T, c.V = setCellFloat(value, precision, bitSize)
- c.IS = nil
+ c.setCellFloat(value, precision, bitSize)
return f.removeFormula(c, ws, sheet)
}
// setCellFloat prepares cell type and string type cell value by a given float
// value.
-func setCellFloat(value float64, precision, bitSize int) (t string, v string) {
- v = strconv.FormatFloat(value, 'f', precision, bitSize)
- return
+func (c *xlsxC) setCellFloat(value float64, precision, bitSize int) {
+ if math.IsNaN(value) || math.IsInf(value, 0) {
+ c.setInlineStr(fmt.Sprint(value))
+ return
+ }
+ c.T, c.V = "", strconv.FormatFloat(value, 'f', precision, bitSize)
+ c.IS = nil
}
// SetCellStr provides a function to set string type value of a cell. Total
@@ -505,7 +512,9 @@ func trimCellValue(value string, escape bool) (v string, ns xml.Attr) {
}
if escape {
var buf bytes.Buffer
- _ = xml.EscapeText(&buf, []byte(value))
+ enc := xml.NewEncoder(&buf)
+ _ = enc.EncodeToken(xml.CharData(value))
+ enc.Flush()
value = buf.String()
}
if len(value) > 0 {
@@ -955,14 +964,36 @@ type HyperlinkOpts struct {
Tooltip *string
}
+// removeHyperLink remove hyperlink for worksheet and delete relationships for
+// the worksheet by given sheet name and cell reference. Note that if the cell
+// in a range reference, the whole hyperlinks will be deleted.
+func (f *File) removeHyperLink(ws *xlsxWorksheet, sheet, cell string) error {
+ for idx := 0; idx < len(ws.Hyperlinks.Hyperlink); idx++ {
+ link := ws.Hyperlinks.Hyperlink[idx]
+ ok, err := f.checkCellInRangeRef(cell, link.Ref)
+ if err != nil {
+ return err
+ }
+ if link.Ref == cell || ok {
+ ws.Hyperlinks.Hyperlink = append(ws.Hyperlinks.Hyperlink[:idx], ws.Hyperlinks.Hyperlink[idx+1:]...)
+ idx--
+ f.deleteSheetRelationships(sheet, link.RID)
+ }
+ }
+ if len(ws.Hyperlinks.Hyperlink) == 0 {
+ ws.Hyperlinks = nil
+ }
+ return nil
+}
+
// SetCellHyperLink provides a function to set cell hyperlink by given
-// worksheet name and link URL address. LinkType defines two types of
+// worksheet name and link URL address. LinkType defines three types of
// hyperlink "External" for website or "Location" for moving to one of cell in
-// this workbook. Maximum limit hyperlinks in a worksheet is 65530. This
-// function is only used to set the hyperlink of the cell and doesn't affect
-// the value of the cell. If you need to set the value of the cell, please use
-// the other functions such as `SetCellStyle` or `SetSheetRow`. The below is
-// example for external link.
+// this workbook or "None" for remove hyperlink. Maximum limit hyperlinks in a
+// worksheet is 65530. This function is only used to set the hyperlink of the
+// cell and doesn't affect the value of the cell. If you need to set the value
+// of the cell, please use the other functions such as `SetCellStyle` or
+// `SetSheetRow`. The below is example for external link.
//
// display, tooltip := "https://github.com/xuri/excelize", "Excelize on GitHub"
// if err := f.SetCellHyperLink("Sheet1", "A3",
@@ -1030,6 +1061,8 @@ func (f *File) SetCellHyperLink(sheet, cell, link, linkType string, opts ...Hype
Ref: cell,
Location: link,
}
+ case "None":
+ return f.removeHyperLink(ws, sheet, cell)
default:
return newInvalidLinkTypeError(linkType)
}
@@ -1082,11 +1115,11 @@ func (f *File) GetCellRichText(sheet, cell string) (runs []RichTextRun, err erro
runs = getCellRichText(c.IS)
return
}
- if c.T == "" {
+ if c.T != "s" || c.V == "" {
return
}
siIdx, err := strconv.Atoi(c.V)
- if err != nil || c.T != "s" {
+ if err != nil {
return
}
sst, err := f.sharedStringsReader()
@@ -1426,8 +1459,8 @@ func (f *File) getCellStringFunc(sheet, cell string, fn func(x *xlsxWorksheet, c
return "", err
}
lastRowNum := 0
- if l := len(ws.SheetData.Row); l > 0 && ws.SheetData.Row[l-1].R != nil {
- lastRowNum = *ws.SheetData.Row[l-1].R
+ if l := len(ws.SheetData.Row); l > 0 {
+ lastRowNum = ws.SheetData.Row[l-1].R
}
// keep in mind: row starts from 1
@@ -1437,7 +1470,7 @@ func (f *File) getCellStringFunc(sheet, cell string, fn func(x *xlsxWorksheet, c
for rowIdx := range ws.SheetData.Row {
rowData := &ws.SheetData.Row[rowIdx]
- if rowData.R != nil && *rowData.R != row {
+ if rowData.R != row {
continue
}
for colIdx := range rowData.C {
@@ -1655,8 +1688,10 @@ func parseSharedFormula(dCol, dRow int, orig []byte) (res string, start int) {
// Note that this function not validate ref tag to check the cell whether in
// allow range reference, and always return origin shared formula.
func getSharedFormula(ws *xlsxWorksheet, si int, cell string) string {
- for _, r := range ws.SheetData.Row {
- for _, c := range r.C {
+ for row := 0; row < len(ws.SheetData.Row); row++ {
+ r := &ws.SheetData.Row[row]
+ for column := 0; column < len(r.C); column++ {
+ c := &r.C[column]
if c.F != nil && c.F.Ref != "" && c.F.T == STCellFormulaTypeShared && c.F.Si != nil && *c.F.Si == si {
col, row, _ := CellNameToCoordinates(cell)
sharedCol, sharedRow, _ := CellNameToCoordinates(c.R)
diff --git a/vendor/github.com/xuri/excelize/v2/chart.go b/vendor/github.com/xuri/excelize/v2/chart.go
index a1078f70..5b4b39fa 100644
--- a/vendor/github.com/xuri/excelize/v2/chart.go
+++ b/vendor/github.com/xuri/excelize/v2/chart.go
@@ -85,11 +85,25 @@ type ChartLineType byte
// This section defines the currently supported chart line types enumeration.
const (
- ChartLineSolid ChartLineType = iota
+ ChartLineUnset ChartLineType = iota
+ ChartLineSolid
ChartLineNone
ChartLineAutomatic
)
+// ChartTickLabelPositionType is the type of supported chart tick label position
+// types.
+type ChartTickLabelPositionType byte
+
+// This section defines the supported chart tick label position types
+// enumeration.
+const (
+ ChartTickLabelNextToAxis ChartTickLabelPositionType = iota
+ ChartTickLabelHigh
+ ChartTickLabelLow
+ ChartTickLabelNone
+)
+
// This section defines the default value of chart properties.
var (
chartView3DRotX = map[ChartType]int{
@@ -484,7 +498,13 @@ var (
true: "r",
false: "l",
}
- valTickLblPos = map[ChartType]string{
+ tickLblPosVal = map[ChartTickLabelPositionType]string{
+ ChartTickLabelNextToAxis: "nextTo",
+ ChartTickLabelHigh: "high",
+ ChartTickLabelLow: "low",
+ ChartTickLabelNone: "none",
+ }
+ tickLblPosNone = map[ChartType]string{
Contour: "none",
WireframeContour: "none",
}
diff --git a/vendor/github.com/xuri/excelize/v2/col.go b/vendor/github.com/xuri/excelize/v2/col.go
index b1b9c0d3..68ffc70c 100644
--- a/vendor/github.com/xuri/excelize/v2/col.go
+++ b/vendor/github.com/xuri/excelize/v2/col.go
@@ -63,16 +63,16 @@ type Cols struct {
// fmt.Println()
// }
func (f *File) GetCols(sheet string, opts ...Options) ([][]string, error) {
- if _, err := f.workSheetReader(sheet); err != nil {
+ cols, err := f.Cols(sheet)
+ if err != nil {
return nil, err
}
- cols, err := f.Cols(sheet)
results := make([][]string, 0, 64)
for cols.Next() {
col, _ := cols.Rows(opts...)
results = append(results, col)
}
- return results, err
+ return results, nil
}
// Next will return true if the next column is found.
diff --git a/vendor/github.com/xuri/excelize/v2/datavalidation.go b/vendor/github.com/xuri/excelize/v2/datavalidation.go
index 8e6e5945..f42c1db9 100644
--- a/vendor/github.com/xuri/excelize/v2/datavalidation.go
+++ b/vendor/github.com/xuri/excelize/v2/datavalidation.go
@@ -13,6 +13,7 @@ package excelize
import (
"fmt"
+ "io"
"math"
"strings"
"unicode/utf16"
@@ -222,8 +223,9 @@ func (dv *DataValidation) SetSqref(sqref string) {
}
// AddDataValidation provides set data validation on a range of the worksheet
-// by given data validation object and worksheet name. The data validation
-// object can be created by NewDataValidation function.
+// by given data validation object and worksheet name. This function is
+// concurrency safe. The data validation object can be created by
+// NewDataValidation function.
//
// Example 1, set data validation on Sheet1!A1:B2 with validation criteria
// settings, show error alert after invalid data is entered with "Stop" style
@@ -256,6 +258,8 @@ func (f *File) AddDataValidation(sheet string, dv *DataValidation) error {
if err != nil {
return err
}
+ ws.mu.Lock()
+ defer ws.mu.Unlock()
if nil == ws.DataValidations {
ws.DataValidations = new(xlsxDataValidations)
}
@@ -290,46 +294,83 @@ func (f *File) GetDataValidations(sheet string) ([]*DataValidation, error) {
if err != nil {
return nil, err
}
- if ws.DataValidations == nil || len(ws.DataValidations.DataValidation) == 0 {
- return nil, err
+ var (
+ dataValidations []*DataValidation
+ decodeExtLst = new(decodeExtLst)
+ decodeDataValidations *xlsxDataValidations
+ ext *xlsxExt
+ )
+ if ws.DataValidations != nil {
+ dataValidations = append(dataValidations, getDataValidations(ws.DataValidations)...)
}
- var dvs []*DataValidation
- for _, dv := range ws.DataValidations.DataValidation {
- if dv != nil {
- dataValidation := &DataValidation{
- AllowBlank: dv.AllowBlank,
- Error: dv.Error,
- ErrorStyle: dv.ErrorStyle,
- ErrorTitle: dv.ErrorTitle,
- Operator: dv.Operator,
- Prompt: dv.Prompt,
- PromptTitle: dv.PromptTitle,
- ShowDropDown: dv.ShowDropDown,
- ShowErrorMessage: dv.ShowErrorMessage,
- ShowInputMessage: dv.ShowInputMessage,
- Sqref: dv.Sqref,
- Type: dv.Type,
- }
- if dv.Formula1 != nil {
- dataValidation.Formula1 = unescapeDataValidationFormula(dv.Formula1.Content)
- }
- if dv.Formula2 != nil {
- dataValidation.Formula2 = unescapeDataValidationFormula(dv.Formula2.Content)
+ if ws.ExtLst != nil {
+ if err = f.xmlNewDecoder(strings.NewReader("" + ws.ExtLst.Ext + "")).
+ Decode(decodeExtLst); err != nil && err != io.EOF {
+ return dataValidations, err
+ }
+ for _, ext = range decodeExtLst.Ext {
+ if ext.URI == ExtURIDataValidations {
+ decodeDataValidations = new(xlsxDataValidations)
+ _ = f.xmlNewDecoder(strings.NewReader(ext.Content)).Decode(decodeDataValidations)
+ dataValidations = append(dataValidations, getDataValidations(decodeDataValidations)...)
}
- dvs = append(dvs, dataValidation)
}
}
- return dvs, err
+ return dataValidations, err
+}
+
+// getDataValidations returns data validations list by given worksheet data
+// validations.
+func getDataValidations(dvs *xlsxDataValidations) []*DataValidation {
+ if dvs == nil {
+ return nil
+ }
+ var dataValidations []*DataValidation
+ for _, dv := range dvs.DataValidation {
+ if dv == nil {
+ continue
+ }
+ dataValidation := &DataValidation{
+ AllowBlank: dv.AllowBlank,
+ Error: dv.Error,
+ ErrorStyle: dv.ErrorStyle,
+ ErrorTitle: dv.ErrorTitle,
+ Operator: dv.Operator,
+ Prompt: dv.Prompt,
+ PromptTitle: dv.PromptTitle,
+ ShowDropDown: dv.ShowDropDown,
+ ShowErrorMessage: dv.ShowErrorMessage,
+ ShowInputMessage: dv.ShowInputMessage,
+ Sqref: dv.Sqref,
+ Type: dv.Type,
+ }
+ if dv.Formula1 != nil {
+ dataValidation.Formula1 = unescapeDataValidationFormula(dv.Formula1.Content)
+ }
+ if dv.Formula2 != nil {
+ dataValidation.Formula2 = unescapeDataValidationFormula(dv.Formula2.Content)
+ }
+ if dv.XMSqref != "" {
+ dataValidation.Sqref = dv.XMSqref
+ dataValidation.Formula1 = strings.TrimSuffix(strings.TrimPrefix(dataValidation.Formula1, ""), "")
+ dataValidation.Formula2 = strings.TrimSuffix(strings.TrimPrefix(dataValidation.Formula2, ""), "")
+ }
+ dataValidations = append(dataValidations, dataValidation)
+ }
+ return dataValidations
}
// DeleteDataValidation delete data validation by given worksheet name and
-// reference sequence. All data validations in the worksheet will be deleted
+// reference sequence. This function is concurrency safe.
+// All data validations in the worksheet will be deleted
// if not specify reference sequence parameter.
func (f *File) DeleteDataValidation(sheet string, sqref ...string) error {
ws, err := f.workSheetReader(sheet)
if err != nil {
return err
}
+ ws.mu.Lock()
+ defer ws.mu.Unlock()
if ws.DataValidations == nil {
return nil
}
@@ -337,14 +378,14 @@ func (f *File) DeleteDataValidation(sheet string, sqref ...string) error {
ws.DataValidations = nil
return nil
}
- delCells, err := f.flatSqref(sqref[0])
+ delCells, err := flatSqref(sqref[0])
if err != nil {
return err
}
dv := ws.DataValidations
for i := 0; i < len(dv.DataValidation); i++ {
var applySqref []string
- colCells, err := f.flatSqref(dv.DataValidation[i].Sqref)
+ colCells, err := flatSqref(dv.DataValidation[i].Sqref)
if err != nil {
return err
}
@@ -357,7 +398,7 @@ func (f *File) DeleteDataValidation(sheet string, sqref ...string) error {
}
}
for _, col := range colCells {
- applySqref = append(applySqref, f.squashSqref(col)...)
+ applySqref = append(applySqref, squashSqref(col)...)
}
dv.DataValidation[i].Sqref = strings.Join(applySqref, " ")
if len(applySqref) == 0 {
@@ -373,7 +414,7 @@ func (f *File) DeleteDataValidation(sheet string, sqref ...string) error {
}
// squashSqref generates cell reference sequence by given cells coordinates list.
-func (f *File) squashSqref(cells [][]int) []string {
+func squashSqref(cells [][]int) []string {
if len(cells) == 1 {
cell, _ := CoordinatesToCellName(cells[0][0], cells[0][1])
return []string{cell}
@@ -384,7 +425,7 @@ func (f *File) squashSqref(cells [][]int) []string {
l, r := 0, 0
for i := 1; i < len(cells); i++ {
if cells[i][0] == cells[r][0] && cells[i][1]-cells[r][1] > 1 {
- ref, _ := f.coordinatesToRangeRef(append(cells[l], cells[r]...))
+ ref, _ := coordinatesToRangeRef(append(cells[l], cells[r]...))
if l == r {
ref, _ = CoordinatesToCellName(cells[l][0], cells[l][1])
}
@@ -394,13 +435,18 @@ func (f *File) squashSqref(cells [][]int) []string {
r++
}
}
- ref, _ := f.coordinatesToRangeRef(append(cells[l], cells[r]...))
+ ref, _ := coordinatesToRangeRef(append(cells[l], cells[r]...))
if l == r {
ref, _ = CoordinatesToCellName(cells[l][0], cells[l][1])
}
return append(refs, ref)
}
+// isFormulaDataValidation returns whether the data validation rule is a formula.
+func (dv *xlsxInnerXML) isFormula() bool {
+ return dv != nil && !(strings.HasPrefix(dv.Content, """) && strings.HasSuffix(dv.Content, """))
+}
+
// unescapeDataValidationFormula returns unescaped data validation formula.
func unescapeDataValidationFormula(val string) string {
if strings.HasPrefix(val, "\"") { // Text detection
diff --git a/vendor/github.com/xuri/excelize/v2/date.go b/vendor/github.com/xuri/excelize/v2/date.go
index de39b9cf..c26dd49d 100644
--- a/vendor/github.com/xuri/excelize/v2/date.go
+++ b/vendor/github.com/xuri/excelize/v2/date.go
@@ -214,3 +214,31 @@ func formatYear(y int) int {
}
return y
}
+
+// getDurationNumFmt returns most simplify numbers format code for time
+// duration type cell value by given worksheet name, cell reference and number.
+func getDurationNumFmt(d time.Duration) int {
+ if d >= time.Hour*24 {
+ return 46
+ }
+ // Whole minutes
+ if d.Minutes() == float64(int(d.Minutes())) {
+ return 20
+ }
+ return 21
+}
+
+// getTimeNumFmt returns most simplify numbers format code for time type cell
+// value by given worksheet name, cell reference and number.
+func getTimeNumFmt(t time.Time) int {
+ nextMonth := t.AddDate(0, 1, 0)
+ // Whole months
+ if t.Day() == 1 && nextMonth.Day() == 1 {
+ return 17
+ }
+ // Whole days
+ if t.Hour() == 0 && t.Minute() == 0 && t.Second() == 0 && t.Nanosecond() == 0 {
+ return 14
+ }
+ return 22
+}
diff --git a/vendor/github.com/xuri/excelize/v2/drawing.go b/vendor/github.com/xuri/excelize/v2/drawing.go
index 3c2da067..d0b66aff 100644
--- a/vendor/github.com/xuri/excelize/v2/drawing.go
+++ b/vendor/github.com/xuri/excelize/v2/drawing.go
@@ -108,7 +108,7 @@ func (f *File) addChart(opts *Chart, comboCharts []*Chart) {
},
}
xlsxChartSpace.SpPr = f.drawShapeFill(opts.Fill, xlsxChartSpace.SpPr)
- plotAreaFunc := map[ChartType]func(*Chart) *cPlotArea{
+ plotAreaFunc := map[ChartType]func(pa *cPlotArea, opts *Chart) *cPlotArea{
Area: f.drawBaseChart,
AreaStacked: f.drawBaseChart,
AreaPercentStacked: f.drawBaseChart,
@@ -176,14 +176,19 @@ func (f *File) addChart(opts *Chart, comboCharts []*Chart) {
if field.IsNil() {
continue
}
- immutable.FieldByName(mutable.Type().Field(i).Name).Set(field)
+ fld := immutable.FieldByName(mutable.Type().Field(i).Name)
+ if field.Kind() == reflect.Slice && i < 16 { // All []*cCharts type fields
+ fld.Set(reflect.Append(fld, field.Index(0)))
+ continue
+ }
+ fld.Set(field)
}
}
- addChart(xlsxChartSpace.Chart.PlotArea, plotAreaFunc[opts.Type](opts))
+ addChart(xlsxChartSpace.Chart.PlotArea, plotAreaFunc[opts.Type](xlsxChartSpace.Chart.PlotArea, opts))
order := len(opts.Series)
for idx := range comboCharts {
comboCharts[idx].order = order
- addChart(xlsxChartSpace.Chart.PlotArea, plotAreaFunc[comboCharts[idx].Type](comboCharts[idx]))
+ addChart(xlsxChartSpace.Chart.PlotArea, plotAreaFunc[comboCharts[idx].Type](xlsxChartSpace.Chart.PlotArea, comboCharts[idx]))
order += len(comboCharts[idx].Series)
}
chart, _ := xml.Marshal(xlsxChartSpace)
@@ -193,240 +198,242 @@ func (f *File) addChart(opts *Chart, comboCharts []*Chart) {
// drawBaseChart provides a function to draw the c:plotArea element for bar,
// and column series charts by given format sets.
-func (f *File) drawBaseChart(opts *Chart) *cPlotArea {
- c := cCharts{
- BarDir: &attrValString{
- Val: stringPtr("col"),
- },
- Grouping: &attrValString{
- Val: stringPtr(plotAreaChartGrouping[opts.Type]),
- },
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+func (f *File) drawBaseChart(pa *cPlotArea, opts *Chart) *cPlotArea {
+ c := []*cCharts{
+ {
+ BarDir: &attrValString{
+ Val: stringPtr("col"),
+ },
+ Grouping: &attrValString{
+ Val: stringPtr(plotAreaChartGrouping[opts.Type]),
+ },
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
+ Shape: f.drawChartShape(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
+ Overlap: &attrValInt{Val: intPtr(100)},
},
- Ser: f.drawChartSeries(opts),
- Shape: f.drawChartShape(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
- Overlap: &attrValInt{Val: intPtr(100)},
}
var ok bool
- if *c.BarDir.Val, ok = plotAreaChartBarDir[opts.Type]; !ok {
- c.BarDir = nil
+ if *c[0].BarDir.Val, ok = plotAreaChartBarDir[opts.Type]; !ok {
+ c[0].BarDir = nil
}
- if *c.Overlap.Val, ok = plotAreaChartOverlap[opts.Type]; !ok {
- c.Overlap = nil
+ if *c[0].Overlap.Val, ok = plotAreaChartOverlap[opts.Type]; !ok {
+ c[0].Overlap = nil
}
- catAx := f.drawPlotAreaCatAx(opts)
- valAx := f.drawPlotAreaValAx(opts)
+ catAx := f.drawPlotAreaCatAx(pa, opts)
+ valAx := f.drawPlotAreaValAx(pa, opts)
charts := map[ChartType]*cPlotArea{
Area: {
- AreaChart: &c,
+ AreaChart: c,
CatAx: catAx,
ValAx: valAx,
},
AreaStacked: {
- AreaChart: &c,
+ AreaChart: c,
CatAx: catAx,
ValAx: valAx,
},
AreaPercentStacked: {
- AreaChart: &c,
+ AreaChart: c,
CatAx: catAx,
ValAx: valAx,
},
Area3D: {
- Area3DChart: &c,
+ Area3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Area3DStacked: {
- Area3DChart: &c,
+ Area3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Area3DPercentStacked: {
- Area3DChart: &c,
+ Area3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
BarStacked: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
BarPercentStacked: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DConeClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DConeStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DConePercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DPyramidClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DPyramidStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DPyramidPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DCylinderClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DCylinderStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bar3DCylinderPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
ColStacked: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
ColPercentStacked: {
- BarChart: &c,
+ BarChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3D: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DCone: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DConeClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DConeStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DConePercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DPyramid: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DPyramidClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DPyramidStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DPyramidPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DCylinder: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DCylinderClustered: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DCylinderStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Col3DCylinderPercentStacked: {
- Bar3DChart: &c,
+ Bar3DChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bubble: {
- BubbleChart: &c,
+ BubbleChart: c,
CatAx: catAx,
ValAx: valAx,
},
Bubble3D: {
- BubbleChart: &c,
+ BubbleChart: c,
CatAx: catAx,
ValAx: valAx,
},
@@ -436,233 +443,256 @@ func (f *File) drawBaseChart(opts *Chart) *cPlotArea {
// drawDoughnutChart provides a function to draw the c:plotArea element for
// doughnut chart by given format sets.
-func (f *File) drawDoughnutChart(opts *Chart) *cPlotArea {
+func (f *File) drawDoughnutChart(pa *cPlotArea, opts *Chart) *cPlotArea {
holeSize := 75
if opts.HoleSize > 0 && opts.HoleSize <= 90 {
holeSize = opts.HoleSize
}
return &cPlotArea{
- DoughnutChart: &cCharts{
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ DoughnutChart: []*cCharts{
+ {
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
+ HoleSize: &attrValInt{Val: intPtr(holeSize)},
},
- Ser: f.drawChartSeries(opts),
- HoleSize: &attrValInt{Val: intPtr(holeSize)},
},
}
}
// drawLineChart provides a function to draw the c:plotArea element for line
// chart by given format sets.
-func (f *File) drawLineChart(opts *Chart) *cPlotArea {
+func (f *File) drawLineChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- LineChart: &cCharts{
- Grouping: &attrValString{
- Val: stringPtr(plotAreaChartGrouping[opts.Type]),
- },
- VaryColors: &attrValBool{
- Val: boolPtr(false),
+ LineChart: []*cCharts{
+ {
+ Grouping: &attrValString{
+ Val: stringPtr(plotAreaChartGrouping[opts.Type]),
+ },
+ VaryColors: &attrValBool{
+ Val: boolPtr(false),
+ },
+ Ser: f.drawChartSeries(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
},
- Ser: f.drawChartSeries(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ CatAx: f.drawPlotAreaCatAx(pa, opts),
+ ValAx: f.drawPlotAreaValAx(pa, opts),
}
}
// drawLine3DChart provides a function to draw the c:plotArea element for line
// chart by given format sets.
-func (f *File) drawLine3DChart(opts *Chart) *cPlotArea {
+func (f *File) drawLine3DChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- Line3DChart: &cCharts{
- Grouping: &attrValString{
- Val: stringPtr(plotAreaChartGrouping[opts.Type]),
- },
- VaryColors: &attrValBool{
- Val: boolPtr(false),
+ Line3DChart: []*cCharts{
+ {
+ Grouping: &attrValString{
+ Val: stringPtr(plotAreaChartGrouping[opts.Type]),
+ },
+ VaryColors: &attrValBool{
+ Val: boolPtr(false),
+ },
+ Ser: f.drawChartSeries(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
},
- Ser: f.drawChartSeries(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ CatAx: f.drawPlotAreaCatAx(pa, opts),
+ ValAx: f.drawPlotAreaValAx(pa, opts),
}
}
// drawPieChart provides a function to draw the c:plotArea element for pie
// chart by given format sets.
-func (f *File) drawPieChart(opts *Chart) *cPlotArea {
+func (f *File) drawPieChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- PieChart: &cCharts{
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ PieChart: []*cCharts{
+ {
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
},
- Ser: f.drawChartSeries(opts),
},
}
}
// drawPie3DChart provides a function to draw the c:plotArea element for 3D
// pie chart by given format sets.
-func (f *File) drawPie3DChart(opts *Chart) *cPlotArea {
+func (f *File) drawPie3DChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- Pie3DChart: &cCharts{
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ Pie3DChart: []*cCharts{
+ {
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
},
- Ser: f.drawChartSeries(opts),
},
}
}
// drawPieOfPieChart provides a function to draw the c:plotArea element for
// pie chart by given format sets.
-func (f *File) drawPieOfPieChart(opts *Chart) *cPlotArea {
+func (f *File) drawPieOfPieChart(pa *cPlotArea, opts *Chart) *cPlotArea {
var splitPos *attrValInt
if opts.PlotArea.SecondPlotValues > 0 {
splitPos = &attrValInt{Val: intPtr(opts.PlotArea.SecondPlotValues)}
}
return &cPlotArea{
- OfPieChart: &cCharts{
- OfPieType: &attrValString{
- Val: stringPtr("pie"),
- },
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ OfPieChart: []*cCharts{
+ {
+ OfPieType: &attrValString{
+ Val: stringPtr("pie"),
+ },
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
+ SplitPos: splitPos,
+ SerLines: &attrValString{},
},
- Ser: f.drawChartSeries(opts),
- SplitPos: splitPos,
- SerLines: &attrValString{},
},
}
}
// drawBarOfPieChart provides a function to draw the c:plotArea element for
// pie chart by given format sets.
-func (f *File) drawBarOfPieChart(opts *Chart) *cPlotArea {
+func (f *File) drawBarOfPieChart(pa *cPlotArea, opts *Chart) *cPlotArea {
var splitPos *attrValInt
if opts.PlotArea.SecondPlotValues > 0 {
splitPos = &attrValInt{Val: intPtr(opts.PlotArea.SecondPlotValues)}
}
return &cPlotArea{
- OfPieChart: &cCharts{
- OfPieType: &attrValString{
- Val: stringPtr("bar"),
- },
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ OfPieChart: []*cCharts{
+ {
+ OfPieType: &attrValString{
+ Val: stringPtr("bar"),
+ },
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ SplitPos: splitPos,
+ Ser: f.drawChartSeries(opts),
+ SerLines: &attrValString{},
},
- SplitPos: splitPos,
- Ser: f.drawChartSeries(opts),
- SerLines: &attrValString{},
},
}
}
// drawRadarChart provides a function to draw the c:plotArea element for radar
// chart by given format sets.
-func (f *File) drawRadarChart(opts *Chart) *cPlotArea {
+func (f *File) drawRadarChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- RadarChart: &cCharts{
- RadarStyle: &attrValString{
- Val: stringPtr("marker"),
- },
- VaryColors: &attrValBool{
- Val: boolPtr(false),
+ RadarChart: []*cCharts{
+ {
+ RadarStyle: &attrValString{
+ Val: stringPtr("marker"),
+ },
+ VaryColors: &attrValBool{
+ Val: boolPtr(false),
+ },
+ Ser: f.drawChartSeries(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
},
- Ser: f.drawChartSeries(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ CatAx: f.drawPlotAreaCatAx(pa, opts),
+ ValAx: f.drawPlotAreaValAx(pa, opts),
}
}
// drawScatterChart provides a function to draw the c:plotArea element for
// scatter chart by given format sets.
-func (f *File) drawScatterChart(opts *Chart) *cPlotArea {
+func (f *File) drawScatterChart(pa *cPlotArea, opts *Chart) *cPlotArea {
return &cPlotArea{
- ScatterChart: &cCharts{
- ScatterStyle: &attrValString{
- Val: stringPtr("smoothMarker"), // line,lineMarker,marker,none,smooth,smoothMarker
- },
- VaryColors: &attrValBool{
- Val: boolPtr(false),
+ ScatterChart: []*cCharts{
+ {
+ ScatterStyle: &attrValString{
+ Val: stringPtr("smoothMarker"), // line,lineMarker,marker,none,smooth,smoothMarker
+ },
+ VaryColors: &attrValBool{
+ Val: boolPtr(false),
+ },
+ Ser: f.drawChartSeries(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
},
- Ser: f.drawChartSeries(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ ValAx: append(f.drawPlotAreaCatAx(pa, opts), f.drawPlotAreaValAx(pa, opts)...),
}
}
// drawSurface3DChart provides a function to draw the c:surface3DChart element by
// given format sets.
-func (f *File) drawSurface3DChart(opts *Chart) *cPlotArea {
+func (f *File) drawSurface3DChart(pa *cPlotArea, opts *Chart) *cPlotArea {
plotArea := &cPlotArea{
- Surface3DChart: &cCharts{
- Ser: f.drawChartSeries(opts),
- AxID: []*attrValInt{
- {Val: intPtr(100000000)},
- {Val: intPtr(100000001)},
- {Val: intPtr(100000005)},
+ Surface3DChart: []*cCharts{
+ {
+ Ser: f.drawChartSeries(opts),
+ AxID: []*attrValInt{
+ {Val: intPtr(100000000)},
+ {Val: intPtr(100000001)},
+ {Val: intPtr(100000005)},
+ },
},
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ CatAx: f.drawPlotAreaCatAx(pa, opts),
+ ValAx: f.drawPlotAreaValAx(pa, opts),
SerAx: f.drawPlotAreaSerAx(opts),
}
if opts.Type == WireframeSurface3D {
- plotArea.Surface3DChart.Wireframe = &attrValBool{Val: boolPtr(true)}
+ plotArea.Surface3DChart[0].Wireframe = &attrValBool{Val: boolPtr(true)}
}
return plotArea
}
// drawSurfaceChart provides a function to draw the c:surfaceChart element by
// given format sets.
-func (f *File) drawSurfaceChart(opts *Chart) *cPlotArea {
+func (f *File) drawSurfaceChart(pa *cPlotArea, opts *Chart) *cPlotArea {
plotArea := &cPlotArea{
- SurfaceChart: &cCharts{
- Ser: f.drawChartSeries(opts),
- AxID: []*attrValInt{
- {Val: intPtr(100000000)},
- {Val: intPtr(100000001)},
- {Val: intPtr(100000005)},
+ SurfaceChart: []*cCharts{
+ {
+ Ser: f.drawChartSeries(opts),
+ AxID: []*attrValInt{
+ {Val: intPtr(100000000)},
+ {Val: intPtr(100000001)},
+ {Val: intPtr(100000005)},
+ },
},
},
- CatAx: f.drawPlotAreaCatAx(opts),
- ValAx: f.drawPlotAreaValAx(opts),
+ CatAx: f.drawPlotAreaCatAx(pa, opts),
+ ValAx: f.drawPlotAreaValAx(pa, opts),
SerAx: f.drawPlotAreaSerAx(opts),
}
if opts.Type == WireframeContour {
- plotArea.SurfaceChart.Wireframe = &attrValBool{Val: boolPtr(true)}
+ plotArea.SurfaceChart[0].Wireframe = &attrValBool{Val: boolPtr(true)}
}
return plotArea
}
// drawBubbleChart provides a function to draw the c:bubbleChart element by
// given format sets.
-func (f *File) drawBubbleChart(opts *Chart) *cPlotArea {
+func (f *File) drawBubbleChart(pa *cPlotArea, opts *Chart) *cPlotArea {
plotArea := &cPlotArea{
- BubbleChart: &cCharts{
- VaryColors: &attrValBool{
- Val: opts.VaryColors,
+ BubbleChart: []*cCharts{
+ {
+ VaryColors: &attrValBool{
+ Val: opts.VaryColors,
+ },
+ Ser: f.drawChartSeries(opts),
+ DLbls: f.drawChartDLbls(opts),
+ AxID: f.genAxID(opts),
},
- Ser: f.drawChartSeries(opts),
- DLbls: f.drawChartDLbls(opts),
- AxID: f.genAxID(opts),
},
- ValAx: []*cAxs{f.drawPlotAreaCatAx(opts)[0], f.drawPlotAreaValAx(opts)[0]},
+ ValAx: append(f.drawPlotAreaCatAx(pa, opts), f.drawPlotAreaValAx(pa, opts)...),
}
if opts.BubbleSize > 0 && opts.BubbleSize <= 300 {
- plotArea.BubbleChart.BubbleScale = &attrValFloat{Val: float64Ptr(float64(opts.BubbleSize))}
+ plotArea.BubbleChart[0].BubbleScale = &attrValFloat{Val: float64Ptr(float64(opts.BubbleSize))}
}
return plotArea
}
@@ -751,23 +781,19 @@ func (f *File) drawShapeFill(fill Fill, spPr *cSpPr) *cSpPr {
func (f *File) drawChartSeriesSpPr(i int, opts *Chart) *cSpPr {
spPr := &cSpPr{SolidFill: &aSolidFill{SchemeClr: &aSchemeClr{Val: "accent" + strconv.Itoa((opts.order+i)%6+1)}}}
spPr = f.drawShapeFill(opts.Series[i].Fill, spPr)
- spPrScatter := &cSpPr{
- Ln: &aLn{
- W: 25400,
- NoFill: &attrValString{},
- },
- }
- spPrLine := &cSpPr{
+ solid := &cSpPr{
Ln: &aLn{
W: f.ptToEMUs(opts.Series[i].Line.Width),
Cap: "rnd", // rnd, sq, flat
SolidFill: spPr.SolidFill,
},
}
- if chartSeriesSpPr, ok := map[ChartType]*cSpPr{
- Line: spPrLine, Scatter: spPrScatter,
+ noLn := &cSpPr{Ln: &aLn{NoFill: &attrValString{}}}
+ if chartSeriesSpPr, ok := map[ChartType]map[ChartLineType]*cSpPr{
+ Line: {ChartLineUnset: solid, ChartLineSolid: solid, ChartLineNone: noLn, ChartLineAutomatic: solid},
+ Scatter: {ChartLineUnset: noLn, ChartLineSolid: solid, ChartLineNone: noLn, ChartLineAutomatic: noLn},
}[opts.Type]; ok {
- return chartSeriesSpPr
+ return chartSeriesSpPr[opts.Series[i].Line.Type]
}
if spPr.SolidFill.SrgbClr != nil {
return spPr
@@ -979,7 +1005,7 @@ func (f *File) drawChartSeriesDLbls(i int, opts *Chart) *cDLbls {
}
// drawPlotAreaCatAx provides a function to draw the c:catAx element.
-func (f *File) drawPlotAreaCatAx(opts *Chart) []*cAxs {
+func (f *File) drawPlotAreaCatAx(pa *cPlotArea, opts *Chart) []*cAxs {
maxVal := &attrValFloat{Val: opts.XAxis.Maximum}
minVal := &attrValFloat{Val: opts.XAxis.Minimum}
if opts.XAxis.Maximum == nil {
@@ -988,70 +1014,53 @@ func (f *File) drawPlotAreaCatAx(opts *Chart) []*cAxs {
if opts.XAxis.Minimum == nil {
minVal = nil
}
- axs := []*cAxs{
- {
- AxID: &attrValInt{Val: intPtr(100000000)},
- Scaling: &cScaling{
- Orientation: &attrValString{Val: stringPtr(orientation[opts.XAxis.ReverseOrder])},
- Max: maxVal,
- Min: minVal,
- },
- Delete: &attrValBool{Val: boolPtr(opts.XAxis.None)},
- AxPos: &attrValString{Val: stringPtr(catAxPos[opts.XAxis.ReverseOrder])},
- NumFmt: &cNumFmt{FormatCode: "General"},
- MajorTickMark: &attrValString{Val: stringPtr("none")},
- MinorTickMark: &attrValString{Val: stringPtr("none")},
- Title: f.drawPlotAreaTitles(opts.XAxis.Title, ""),
- TickLblPos: &attrValString{Val: stringPtr("nextTo")},
- SpPr: f.drawPlotAreaSpPr(),
- TxPr: f.drawPlotAreaTxPr(&opts.YAxis),
- CrossAx: &attrValInt{Val: intPtr(100000001)},
- Crosses: &attrValString{Val: stringPtr("autoZero")},
- Auto: &attrValBool{Val: boolPtr(true)},
- LblAlgn: &attrValString{Val: stringPtr("ctr")},
- LblOffset: &attrValInt{Val: intPtr(100)},
- NoMultiLvlLbl: &attrValBool{Val: boolPtr(false)},
- },
+ ax := &cAxs{
+ AxID: &attrValInt{Val: intPtr(100000000)},
+ Scaling: &cScaling{
+ Orientation: &attrValString{Val: stringPtr(orientation[opts.XAxis.ReverseOrder])},
+ Max: maxVal,
+ Min: minVal,
+ },
+ Delete: &attrValBool{Val: boolPtr(opts.XAxis.None)},
+ AxPos: &attrValString{Val: stringPtr(catAxPos[opts.XAxis.ReverseOrder])},
+ NumFmt: &cNumFmt{FormatCode: "General"},
+ MajorTickMark: &attrValString{Val: stringPtr("none")},
+ MinorTickMark: &attrValString{Val: stringPtr("none")},
+ Title: f.drawPlotAreaTitles(opts.XAxis.Title, ""),
+ TickLblPos: &attrValString{Val: stringPtr(tickLblPosVal[opts.XAxis.TickLabelPosition])},
+ SpPr: f.drawPlotAreaSpPr(),
+ TxPr: f.drawPlotAreaTxPr(&opts.XAxis),
+ CrossAx: &attrValInt{Val: intPtr(100000001)},
+ Crosses: &attrValString{Val: stringPtr("autoZero")},
+ Auto: &attrValBool{Val: boolPtr(true)},
+ LblAlgn: &attrValString{Val: stringPtr("ctr")},
+ LblOffset: &attrValInt{Val: intPtr(100)},
+ NoMultiLvlLbl: &attrValBool{Val: boolPtr(false)},
}
if numFmt := f.drawChartNumFmt(opts.XAxis.NumFmt); numFmt != nil {
- axs[0].NumFmt = numFmt
+ ax.NumFmt = numFmt
}
if opts.XAxis.MajorGridLines {
- axs[0].MajorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
+ ax.MajorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
}
if opts.XAxis.MinorGridLines {
- axs[0].MinorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
+ ax.MinorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
}
if opts.XAxis.TickLabelSkip != 0 {
- axs[0].TickLblSkip = &attrValInt{Val: intPtr(opts.XAxis.TickLabelSkip)}
+ ax.TickLblSkip = &attrValInt{Val: intPtr(opts.XAxis.TickLabelSkip)}
}
- if opts.order > 0 && opts.YAxis.Secondary {
- axs = append(axs, &cAxs{
- AxID: &attrValInt{Val: intPtr(opts.XAxis.axID)},
- Scaling: &cScaling{
- Orientation: &attrValString{Val: stringPtr(orientation[opts.XAxis.ReverseOrder])},
- Max: maxVal,
- Min: minVal,
- },
- Delete: &attrValBool{Val: boolPtr(true)},
- AxPos: &attrValString{Val: stringPtr("b")},
- MajorTickMark: &attrValString{Val: stringPtr("none")},
- MinorTickMark: &attrValString{Val: stringPtr("none")},
- TickLblPos: &attrValString{Val: stringPtr("nextTo")},
- SpPr: f.drawPlotAreaSpPr(),
- TxPr: f.drawPlotAreaTxPr(&opts.YAxis),
- CrossAx: &attrValInt{Val: intPtr(opts.YAxis.axID)},
- Auto: &attrValBool{Val: boolPtr(true)},
- LblAlgn: &attrValString{Val: stringPtr("ctr")},
- LblOffset: &attrValInt{Val: intPtr(100)},
- NoMultiLvlLbl: &attrValBool{Val: boolPtr(false)},
- })
+ if opts.order > 0 && opts.YAxis.Secondary && pa.CatAx != nil {
+ ax.AxID = &attrValInt{Val: intPtr(opts.XAxis.axID)}
+ ax.Delete = &attrValBool{Val: boolPtr(true)}
+ ax.Crosses = nil
+ ax.CrossAx = &attrValInt{Val: intPtr(opts.YAxis.axID)}
+ return []*cAxs{pa.CatAx[0], ax}
}
- return axs
+ return []*cAxs{ax}
}
// drawPlotAreaValAx provides a function to draw the c:valAx element.
-func (f *File) drawPlotAreaValAx(opts *Chart) []*cAxs {
+func (f *File) drawPlotAreaValAx(pa *cPlotArea, opts *Chart) []*cAxs {
maxVal := &attrValFloat{Val: opts.YAxis.Maximum}
minVal := &attrValFloat{Val: opts.YAxis.Minimum}
if opts.YAxis.Maximum == nil {
@@ -1064,67 +1073,52 @@ func (f *File) drawPlotAreaValAx(opts *Chart) []*cAxs {
if opts.YAxis.LogBase >= 2 && opts.YAxis.LogBase <= 1000 {
logBase = &attrValFloat{Val: float64Ptr(opts.YAxis.LogBase)}
}
- axs := []*cAxs{
- {
- AxID: &attrValInt{Val: intPtr(100000001)},
- Scaling: &cScaling{
- LogBase: logBase,
- Orientation: &attrValString{Val: stringPtr(orientation[opts.YAxis.ReverseOrder])},
- Max: maxVal,
- Min: minVal,
- },
- Delete: &attrValBool{Val: boolPtr(opts.YAxis.None)},
- AxPos: &attrValString{Val: stringPtr(valAxPos[opts.YAxis.ReverseOrder])},
- Title: f.drawPlotAreaTitles(opts.YAxis.Title, "horz"),
- NumFmt: &cNumFmt{
- FormatCode: chartValAxNumFmtFormatCode[opts.Type],
- },
- MajorTickMark: &attrValString{Val: stringPtr("none")},
- MinorTickMark: &attrValString{Val: stringPtr("none")},
- TickLblPos: &attrValString{Val: stringPtr("nextTo")},
- SpPr: f.drawPlotAreaSpPr(),
- TxPr: f.drawPlotAreaTxPr(&opts.XAxis),
- CrossAx: &attrValInt{Val: intPtr(100000000)},
- Crosses: &attrValString{Val: stringPtr("autoZero")},
- CrossBetween: &attrValString{Val: stringPtr(chartValAxCrossBetween[opts.Type])},
- },
+ ax := &cAxs{
+ AxID: &attrValInt{Val: intPtr(100000001)},
+ Scaling: &cScaling{
+ LogBase: logBase,
+ Orientation: &attrValString{Val: stringPtr(orientation[opts.YAxis.ReverseOrder])},
+ Max: maxVal,
+ Min: minVal,
+ },
+ Delete: &attrValBool{Val: boolPtr(opts.YAxis.None)},
+ AxPos: &attrValString{Val: stringPtr(valAxPos[opts.YAxis.ReverseOrder])},
+ Title: f.drawPlotAreaTitles(opts.YAxis.Title, "horz"),
+ NumFmt: &cNumFmt{
+ FormatCode: chartValAxNumFmtFormatCode[opts.Type],
+ },
+ MajorTickMark: &attrValString{Val: stringPtr("none")},
+ MinorTickMark: &attrValString{Val: stringPtr("none")},
+ TickLblPos: &attrValString{Val: stringPtr(tickLblPosVal[opts.YAxis.TickLabelPosition])},
+ SpPr: f.drawPlotAreaSpPr(),
+ TxPr: f.drawPlotAreaTxPr(&opts.YAxis),
+ CrossAx: &attrValInt{Val: intPtr(100000000)},
+ Crosses: &attrValString{Val: stringPtr("autoZero")},
+ CrossBetween: &attrValString{Val: stringPtr(chartValAxCrossBetween[opts.Type])},
}
if numFmt := f.drawChartNumFmt(opts.YAxis.NumFmt); numFmt != nil {
- axs[0].NumFmt = numFmt
+ ax.NumFmt = numFmt
}
if opts.YAxis.MajorGridLines {
- axs[0].MajorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
+ ax.MajorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
}
if opts.YAxis.MinorGridLines {
- axs[0].MinorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
+ ax.MinorGridlines = &cChartLines{SpPr: f.drawPlotAreaSpPr()}
}
- if pos, ok := valTickLblPos[opts.Type]; ok {
- axs[0].TickLblPos.Val = stringPtr(pos)
+ if pos, ok := tickLblPosNone[opts.Type]; ok {
+ ax.TickLblPos.Val = stringPtr(pos)
}
if opts.YAxis.MajorUnit != 0 {
- axs[0].MajorUnit = &attrValFloat{Val: float64Ptr(opts.YAxis.MajorUnit)}
+ ax.MajorUnit = &attrValFloat{Val: float64Ptr(opts.YAxis.MajorUnit)}
}
- if opts.order > 0 && opts.YAxis.Secondary {
- axs = append(axs, &cAxs{
- AxID: &attrValInt{Val: intPtr(opts.YAxis.axID)},
- Scaling: &cScaling{
- Orientation: &attrValString{Val: stringPtr(orientation[opts.YAxis.ReverseOrder])},
- Max: maxVal,
- Min: minVal,
- },
- Delete: &attrValBool{Val: boolPtr(false)},
- AxPos: &attrValString{Val: stringPtr("r")},
- MajorTickMark: &attrValString{Val: stringPtr("none")},
- MinorTickMark: &attrValString{Val: stringPtr("none")},
- TickLblPos: &attrValString{Val: stringPtr("nextTo")},
- SpPr: f.drawPlotAreaSpPr(),
- TxPr: f.drawPlotAreaTxPr(&opts.XAxis),
- CrossAx: &attrValInt{Val: intPtr(opts.XAxis.axID)},
- Crosses: &attrValString{Val: stringPtr("max")},
- CrossBetween: &attrValString{Val: stringPtr(chartValAxCrossBetween[opts.Type])},
- })
+ if opts.order > 0 && opts.YAxis.Secondary && pa.ValAx != nil {
+ ax.AxID = &attrValInt{Val: intPtr(opts.YAxis.axID)}
+ ax.AxPos = &attrValString{Val: stringPtr("r")}
+ ax.Crosses = &attrValString{Val: stringPtr("max")}
+ ax.CrossAx = &attrValInt{Val: intPtr(opts.XAxis.axID)}
+ return []*cAxs{pa.ValAx[0], ax}
}
- return axs
+ return []*cAxs{ax}
}
// drawPlotAreaSerAx provides a function to draw the c:serAx element.
@@ -1147,7 +1141,7 @@ func (f *File) drawPlotAreaSerAx(opts *Chart) []*cAxs {
},
Delete: &attrValBool{Val: boolPtr(opts.YAxis.None)},
AxPos: &attrValString{Val: stringPtr(catAxPos[opts.XAxis.ReverseOrder])},
- TickLblPos: &attrValString{Val: stringPtr("nextTo")},
+ TickLblPos: &attrValString{Val: stringPtr(tickLblPosVal[opts.YAxis.TickLabelPosition])},
SpPr: f.drawPlotAreaSpPr(),
TxPr: f.drawPlotAreaTxPr(nil),
CrossAx: &attrValInt{Val: intPtr(100000001)},
diff --git a/vendor/github.com/xuri/excelize/v2/errors.go b/vendor/github.com/xuri/excelize/v2/errors.go
index b460dfd2..55a3c3c3 100644
--- a/vendor/github.com/xuri/excelize/v2/errors.go
+++ b/vendor/github.com/xuri/excelize/v2/errors.go
@@ -97,6 +97,9 @@ var (
// ErrPasswordLengthInvalid defined the error message on invalid password
// length.
ErrPasswordLengthInvalid = errors.New("password length invalid")
+ // ErrPivotTableClassicLayout defined the error message on enable
+ // ClassicLayout and CompactData in the same time.
+ ErrPivotTableClassicLayout = errors.New("cannot enable ClassicLayout and CompactData in the same time")
// ErrSave defined the error message for saving file.
ErrSave = errors.New("no path defined for file, consider File.WriteTo or File.Write")
// ErrSheetIdx defined the error message on receive the invalid worksheet
@@ -264,6 +267,12 @@ func newInvalidStyleID(styleID int) error {
return fmt.Errorf("invalid style ID %d", styleID)
}
+// newNoExistSlicerError defined the error message on receiving the non existing
+// slicer name.
+func newNoExistSlicerError(name string) error {
+ return fmt.Errorf("slicer %s does not exist", name)
+}
+
// newNoExistTableError defined the error message on receiving the non existing
// table name.
func newNoExistTableError(name string) error {
diff --git a/vendor/github.com/xuri/excelize/v2/excelize.go b/vendor/github.com/xuri/excelize/v2/excelize.go
index 87ef22dd..b53a1714 100644
--- a/vendor/github.com/xuri/excelize/v2/excelize.go
+++ b/vendor/github.com/xuri/excelize/v2/excelize.go
@@ -228,7 +228,7 @@ func (f *File) getOptions(opts ...Options) *Options {
}
// CharsetTranscoder Set user defined codepage transcoder function for open
-// XLSX from non UTF-8 encoding.
+// workbook from non UTF-8 encoding.
func (f *File) CharsetTranscoder(fn charsetTranscoderFn) *File { f.CharsetReader = fn; return f }
// Creates new XML decoder with charset reader.
@@ -242,15 +242,18 @@ func (f *File) xmlNewDecoder(rdr io.Reader) (ret *xml.Decoder) {
// time.Time type cell value by given worksheet name, cell reference and
// number format code.
func (f *File) setDefaultTimeStyle(sheet, cell string, format int) error {
- s, err := f.GetCellStyle(sheet, cell)
+ styleIdx, err := f.GetCellStyle(sheet, cell)
if err != nil {
return err
}
- if s == 0 {
- style, _ := f.NewStyle(&Style{NumFmt: format})
- err = f.SetCellStyle(sheet, cell, cell, style)
+ if styleIdx == 0 {
+ styleIdx, _ = f.NewStyle(&Style{NumFmt: format})
+ } else {
+ style, _ := f.GetStyle(styleIdx)
+ style.NumFmt = format
+ styleIdx, _ = f.NewStyle(style)
}
- return err
+ return f.SetCellStyle(sheet, cell, cell, styleIdx)
}
// workSheetReader provides a function to get the pointer to the structure
@@ -305,84 +308,85 @@ func (f *File) workSheetReader(sheet string) (ws *xlsxWorksheet, err error) {
// checkSheet provides a function to fill each row element and make that is
// continuous in a worksheet of XML.
func (ws *xlsxWorksheet) checkSheet() {
- row, r0 := ws.checkSheetRows()
- sheetData := xlsxSheetData{Row: make([]xlsxRow, row)}
- row = 0
- for _, r := range ws.SheetData.Row {
- if r.R == nil {
- row++
- r.R = intPtr(row)
- sheetData.Row[row-1] = r
- continue
- }
- if *r.R == row && row > 0 {
- sheetData.Row[*r.R-1].C = append(sheetData.Row[*r.R-1].C, r.C...)
- continue
- }
- if *r.R != 0 {
- sheetData.Row[*r.R-1] = r
- row = *r.R
- }
- }
- for i := 1; i <= len(sheetData.Row); i++ {
- sheetData.Row[i-1].R = intPtr(i)
- }
- ws.checkSheetR0(&sheetData, r0)
-}
-
-// checkSheetRows returns the last row number of the worksheet and rows element
-// with r="0" attribute.
-func (ws *xlsxWorksheet) checkSheetRows() (int, []xlsxRow) {
var (
- row, maxVal int
- r0 []xlsxRow
- maxRowNum = func(num int, c []xlsxC) int {
- for _, cell := range c {
- if _, n, err := CellNameToCoordinates(cell.R); err == nil && n > num {
- num = n
+ row int
+ r0Rows []xlsxRow
+ lastRowNum = func(r xlsxRow) int {
+ var num int
+ for _, cell := range r.C {
+ if _, row, err := CellNameToCoordinates(cell.R); err == nil {
+ if row > num {
+ num = row
+ }
}
}
return num
}
)
- for i, r := range ws.SheetData.Row {
- if r.R == nil {
- row++
- continue
- }
- if i == 0 && *r.R == 0 {
- if num := maxRowNum(row, r.C); num > maxVal {
- maxVal = num
+ for i := 0; i < len(ws.SheetData.Row); i++ {
+ r := ws.SheetData.Row[i]
+ if r.R == 0 || r.R == row {
+ num := lastRowNum(r)
+ if num > row {
+ row = num
}
- r0 = append(r0, r)
+ if num == 0 {
+ row++
+ }
+ r.R = row
+ r0Rows = append(r0Rows, r)
+ ws.SheetData.Row = append(ws.SheetData.Row[:i], ws.SheetData.Row[i+1:]...)
+ i--
continue
}
- if *r.R != 0 && *r.R > row {
- row = *r.R
+ if r.R != 0 && r.R > row {
+ row = r.R
}
}
- if maxVal > row {
- row = maxVal
+ sheetData := xlsxSheetData{Row: make([]xlsxRow, row)}
+ row = 0
+ for _, r := range ws.SheetData.Row {
+ if r.R != 0 {
+ sheetData.Row[r.R-1] = r
+ row = r.R
+ }
+ }
+ for _, r0Row := range r0Rows {
+ sheetData.Row[r0Row.R-1].R = r0Row.R
+ ws.checkSheetR0(&sheetData, &r0Row, true)
+ }
+ for i := 1; i <= row; i++ {
+ sheetData.Row[i-1].R = i
+ ws.checkSheetR0(&sheetData, &sheetData.Row[i-1], false)
}
- return row, r0
}
// checkSheetR0 handle the row element with r="0" attribute, cells in this row
// could be disorderly, the cell in this row can be used as the value of
// which cell is empty in the normal rows.
-func (ws *xlsxWorksheet) checkSheetR0(sheetData *xlsxSheetData, r0s []xlsxRow) {
- for _, r0 := range r0s {
- for _, cell := range r0.C {
- if col, row, err := CellNameToCoordinates(cell.R); err == nil {
- rowIdx := row - 1
- columns, colIdx := len(sheetData.Row[rowIdx].C), col-1
- for c := columns; c < col; c++ {
- sheetData.Row[rowIdx].C = append(sheetData.Row[rowIdx].C, xlsxC{})
- }
- if !sheetData.Row[rowIdx].C[colIdx].hasValue() {
- sheetData.Row[rowIdx].C[colIdx] = cell
- }
- }
+func (ws *xlsxWorksheet) checkSheetR0(sheetData *xlsxSheetData, rowData *xlsxRow, r0 bool) {
+ checkRow := func(col, row int, r0 bool, cell xlsxC) {
+ rowIdx := row - 1
+ columns, colIdx := len(sheetData.Row[rowIdx].C), col-1
+ for c := columns; c < col; c++ {
+ sheetData.Row[rowIdx].C = append(sheetData.Row[rowIdx].C, xlsxC{})
+ }
+ if !sheetData.Row[rowIdx].C[colIdx].hasValue() {
+ sheetData.Row[rowIdx].C[colIdx] = cell
+ }
+ if r0 {
+ sheetData.Row[rowIdx].C[colIdx] = cell
+ }
+ }
+ var err error
+ for i, cell := range rowData.C {
+ col, row := i+1, rowData.R
+ if cell.R == "" {
+ checkRow(col, row, r0, cell)
+ continue
+ }
+ if col, row, err = CellNameToCoordinates(cell.R); err == nil && r0 {
+ checkRow(col, row, r0, cell)
}
}
ws.SheetData = *sheetData
@@ -452,14 +456,14 @@ func (f *File) addRels(relPath, relType, target, targetMode string) int {
// UpdateLinkedValue fix linked values within a spreadsheet are not updating in
// Office Excel application. This function will be remove value tag when met a
// cell have a linked value. Reference
-// https://social.technet.microsoft.com/Forums/office/en-US/e16bae1f-6a2c-4325-8013-e989a3479066/excel-2010-linked-cells-not-updating
+// https://learn.microsoft.com/en-us/archive/msdn-technet-forums/e16bae1f-6a2c-4325-8013-e989a3479066
//
// Notice: after opening generated workbook, Excel will update the linked value
// and generate a new value and will prompt to save the file or not.
//
// For example:
//
-//
+//
//
// SUM(Sheet2!D2,Sheet2!D11)
// 100
@@ -468,7 +472,7 @@ func (f *File) addRels(relPath, relType, target, targetMode string) int {
//
// to
//
-//
+//
//
// SUM(Sheet2!D2,Sheet2!D11)
//
@@ -588,3 +592,77 @@ func (f *File) setContentTypePartProjectExtensions(contentType string) error {
}
return err
}
+
+// metadataReader provides a function to get the pointer to the structure
+// after deserialization of xl/metadata.xml.
+func (f *File) metadataReader() (*xlsxMetadata, error) {
+ var mataData xlsxMetadata
+ if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML(defaultXMLMetadata)))).
+ Decode(&mataData); err != nil && err != io.EOF {
+ return &mataData, err
+ }
+ return &mataData, nil
+}
+
+// richValueReader provides a function to get the pointer to the structure after
+// deserialization of xl/richData/richvalue.xml.
+func (f *File) richValueReader() (*xlsxRichValueData, error) {
+ var richValue xlsxRichValueData
+ if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML(defaultXMLRdRichValuePart)))).
+ Decode(&richValue); err != nil && err != io.EOF {
+ return &richValue, err
+ }
+ return &richValue, nil
+}
+
+// richValueRelReader provides a function to get the pointer to the structure
+// after deserialization of xl/richData/richValueRel.xml.
+func (f *File) richValueRelReader() (*xlsxRichValueRels, error) {
+ var richValueRels xlsxRichValueRels
+ if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML(defaultXMLRdRichValueRel)))).
+ Decode(&richValueRels); err != nil && err != io.EOF {
+ return &richValueRels, err
+ }
+ return &richValueRels, nil
+}
+
+// richValueWebImageReader provides a function to get the pointer to the
+// structure after deserialization of xl/richData/rdRichValueWebImage.xml.
+func (f *File) richValueWebImageReader() (*xlsxWebImagesSupportingRichData, error) {
+ var richValueWebImages xlsxWebImagesSupportingRichData
+ if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML(defaultXMLRdRichValueWebImagePart)))).
+ Decode(&richValueWebImages); err != nil && err != io.EOF {
+ return &richValueWebImages, err
+ }
+ return &richValueWebImages, nil
+}
+
+// getRichDataRichValueRelRelationships provides a function to get relationships
+// from xl/richData/_rels/richValueRel.xml.rels by given relationship ID.
+func (f *File) getRichDataRichValueRelRelationships(rID string) *xlsxRelationship {
+ if rels, _ := f.relsReader(defaultXMLRdRichValueRelRels); rels != nil {
+ rels.mu.Lock()
+ defer rels.mu.Unlock()
+ for _, v := range rels.Relationships {
+ if v.ID == rID {
+ return &v
+ }
+ }
+ }
+ return nil
+}
+
+// getRichValueWebImageRelationships provides a function to get relationships
+// from xl/richData/_rels/rdRichValueWebImage.xml.rels by given relationship ID.
+func (f *File) getRichValueWebImageRelationships(rID string) *xlsxRelationship {
+ if rels, _ := f.relsReader(defaultXMLRdRichValueWebImagePartRels); rels != nil {
+ rels.mu.Lock()
+ defer rels.mu.Unlock()
+ for _, v := range rels.Relationships {
+ if v.ID == rID {
+ return &v
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/xuri/excelize/v2/file.go b/vendor/github.com/xuri/excelize/v2/file.go
index 067f9997..03af61eb 100644
--- a/vendor/github.com/xuri/excelize/v2/file.go
+++ b/vendor/github.com/xuri/excelize/v2/file.go
@@ -212,7 +212,7 @@ func (f *File) writeToZip(zw *zip.Writer) error {
files = append(files, path.(string))
return true
})
- sort.Strings(files)
+ sort.Sort(sort.Reverse(sort.StringSlice(files)))
for _, path := range files {
var fi io.Writer
if fi, err = zw.Create(path); err != nil {
@@ -228,7 +228,7 @@ func (f *File) writeToZip(zw *zip.Writer) error {
tempFiles = append(tempFiles, path.(string))
return true
})
- sort.Strings(tempFiles)
+ sort.Sort(sort.Reverse(sort.StringSlice(tempFiles)))
for _, path := range tempFiles {
var fi io.Writer
if fi, err = zw.Create(path); err != nil {
diff --git a/vendor/github.com/xuri/excelize/v2/lib.go b/vendor/github.com/xuri/excelize/v2/lib.go
index a1e340c8..e01c3058 100644
--- a/vendor/github.com/xuri/excelize/v2/lib.go
+++ b/vendor/github.com/xuri/excelize/v2/lib.go
@@ -232,12 +232,18 @@ func ColumnNumberToName(num int) (string, error) {
if num < MinColumns || num > MaxColumns {
return "", ErrColumnNumber
}
- var col string
+ estimatedLength := 0
+ for n := num; n > 0; n = (n - 1) / 26 {
+ estimatedLength++
+ }
+
+ result := make([]byte, estimatedLength)
for num > 0 {
- col = string(rune((num-1)%26+65)) + col
+ estimatedLength--
+ result[estimatedLength] = byte((num-1)%26 + 'A')
num = (num - 1) / 26
}
- return col, nil
+ return string(result), nil
}
// CellNameToCoordinates converts alphanumeric cell name to [X, Y] coordinates
@@ -323,7 +329,7 @@ func sortCoordinates(coordinates []int) error {
// coordinatesToRangeRef provides a function to convert a pair of coordinates
// to range reference.
-func (f *File) coordinatesToRangeRef(coordinates []int, abs ...bool) (string, error) {
+func coordinatesToRangeRef(coordinates []int, abs ...bool) (string, error) {
if len(coordinates) != 4 {
return "", ErrCoordinates
}
@@ -360,7 +366,7 @@ func (f *File) getDefinedNameRefTo(definedNameName, currentSheet string) (refTo
}
// flatSqref convert reference sequence to cell reference list.
-func (f *File) flatSqref(sqref string) (cells map[int][][]int, err error) {
+func flatSqref(sqref string) (cells map[int][][]int, err error) {
var coordinates []int
cells = make(map[int][][]int)
for _, ref := range strings.Fields(sqref) {
@@ -646,6 +652,11 @@ func getRootElement(d *xml.Decoder) []xml.Attr {
case xml.StartElement:
tokenIdx++
if tokenIdx == 1 {
+ for i := 0; i < len(startElement.Attr); i++ {
+ if startElement.Attr[i].Value == NameSpaceSpreadSheet.Value {
+ startElement.Attr[i] = NameSpaceSpreadSheet
+ }
+ }
return startElement.Attr
}
}
diff --git a/vendor/github.com/xuri/excelize/v2/merge.go b/vendor/github.com/xuri/excelize/v2/merge.go
index 9acf54d6..63427bab 100644
--- a/vendor/github.com/xuri/excelize/v2/merge.go
+++ b/vendor/github.com/xuri/excelize/v2/merge.go
@@ -66,6 +66,17 @@ func (f *File) MergeCell(sheet, topLeftCell, bottomRightCell string) error {
}
ws.mu.Lock()
defer ws.mu.Unlock()
+ for col := rect[0]; col <= rect[2]; col++ {
+ for row := rect[1]; row <= rect[3]; row++ {
+ if col == rect[0] && row == rect[1] {
+ continue
+ }
+ ws.prepareSheetXML(col, row)
+ c := &ws.SheetData.Row[row-1].C[col-1]
+ c.setCellDefault("")
+ _ = f.removeFormula(c, ws, sheet)
+ }
+ }
ref := topLeftCell + ":" + bottomRightCell
if ws.MergeCells != nil {
ws.MergeCells.Cells = append(ws.MergeCells.Cells, &xlsxMergeCell{Ref: ref, rect: rect})
@@ -128,8 +139,8 @@ func (f *File) UnmergeCell(sheet, topLeftCell, bottomRightCell string) error {
return nil
}
-// GetMergeCells provides a function to get all merged cells from a worksheet
-// currently.
+// GetMergeCells provides a function to get all merged cells from a specific
+// worksheet.
func (f *File) GetMergeCells(sheet string) ([]MergeCell, error) {
var mergeCells []MergeCell
ws, err := f.workSheetReader(sheet)
diff --git a/vendor/github.com/xuri/excelize/v2/numfmt.go b/vendor/github.com/xuri/excelize/v2/numfmt.go
index d37130b7..265fe283 100644
--- a/vendor/github.com/xuri/excelize/v2/numfmt.go
+++ b/vendor/github.com/xuri/excelize/v2/numfmt.go
@@ -14,6 +14,7 @@ package excelize
import (
"fmt"
"math"
+ "math/big"
"strconv"
"strings"
"time"
@@ -682,6 +683,7 @@ var (
}
// supportedTokenTypes list the supported number format token types currently.
supportedTokenTypes = []string{
+ nfp.TokenTypeAlignment,
nfp.TokenSubTypeCurrencyString,
nfp.TokenSubTypeLanguageInfo,
nfp.TokenTypeColor,
@@ -718,80 +720,80 @@ var (
nfp.TokenTypeDateTimes,
nfp.TokenTypeElapsedDateTimes,
}
- // supportedLanguageInfo directly maps the supported language ID and tags.
- supportedLanguageInfo = map[string]languageInfo{
- "36": {tags: []string{"af"}, localMonth: localMonthsNameAfrikaans, apFmt: apFmtAfrikaans, weekdayNames: weekdayNamesAfrikaans, weekdayNamesAbbr: weekdayNamesAfrikaansAbbr},
- "436": {tags: []string{"af-ZA"}, localMonth: localMonthsNameAfrikaans, apFmt: apFmtAfrikaans, weekdayNames: weekdayNamesAfrikaans, weekdayNamesAbbr: weekdayNamesAfrikaansAbbr},
- "1C": {tags: []string{"sq"}, localMonth: localMonthsNameAlbanian, apFmt: apFmtAlbanian, weekdayNames: weekdayNamesAlbanian, weekdayNamesAbbr: weekdayNamesAlbanianAbbr},
- "41C": {tags: []string{"sq-AL"}, localMonth: localMonthsNameAlbanian, apFmt: apFmtAlbanian, weekdayNames: weekdayNamesAlbanian, weekdayNamesAbbr: weekdayNamesAlbanianAbbr},
- "84": {tags: []string{"gsw"}, localMonth: localMonthsNameAlsatian, apFmt: apFmtAlsatian, weekdayNames: weekdayNamesAlsatian, weekdayNamesAbbr: weekdayNamesAlsatianAbbr},
- "484": {tags: []string{"gsw-FR"}, localMonth: localMonthsNameAlsatianFrance, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAlsatianFrance, weekdayNamesAbbr: weekdayNamesAlsatianFranceAbbr},
- "5E": {tags: []string{"am"}, localMonth: localMonthsNameAmharic, apFmt: apFmtAmharic, weekdayNames: weekdayNamesAmharic, weekdayNamesAbbr: weekdayNamesAmharicAbbr},
- "45E": {tags: []string{"am-ET"}, localMonth: localMonthsNameAmharic, apFmt: apFmtAmharic, weekdayNames: weekdayNamesAmharic, weekdayNamesAbbr: weekdayNamesAmharicAbbr},
- "1": {tags: []string{"ar"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "1401": {tags: []string{"ar-DZ"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "3C01": {tags: []string{"ar-BH"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "C01": {tags: []string{"ar-EG"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "801": {tags: []string{"ar-IQ"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "2C01": {tags: []string{"ar-JO"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "3401": {tags: []string{"ar-KW"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "3001": {tags: []string{"ar-LB"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "1801": {tags: []string{"ar-MA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "2001": {tags: []string{"ar-OM"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "4001": {tags: []string{"ar-QA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "401": {tags: []string{"ar-SA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "2801": {tags: []string{"ar-SY"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "1C01": {tags: []string{"ar-TN"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "3801": {tags: []string{"ar-AE"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "2401": {tags: []string{"ar-YE"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "2B": {tags: []string{"hy"}, localMonth: localMonthsNameArmenian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesArmenian, weekdayNamesAbbr: weekdayNamesArmenianAbbr},
- "42B": {tags: []string{"hy-AM"}, localMonth: localMonthsNameArmenian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesArmenian, weekdayNamesAbbr: weekdayNamesArmenianAbbr},
- "4D": {tags: []string{"as"}, localMonth: localMonthsNameAssamese, apFmt: apFmtAssamese, weekdayNames: weekdayNamesAssamese, weekdayNamesAbbr: weekdayNamesAssameseAbbr},
- "44D": {tags: []string{"as-IN"}, localMonth: localMonthsNameAssamese, apFmt: apFmtAssamese, weekdayNames: weekdayNamesAssamese, weekdayNamesAbbr: weekdayNamesAssameseAbbr},
- "742C": {tags: []string{"az-Cyrl"}, localMonth: localMonthsNameAzerbaijaniCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijaniCyrillic, weekdayNamesAbbr: weekdayNamesAzerbaijaniCyrillicAbbr},
- "82C": {tags: []string{"az-Cyrl-AZ"}, localMonth: localMonthsNameAzerbaijaniCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijaniCyrillic, weekdayNamesAbbr: weekdayNamesAzerbaijaniCyrillicAbbr},
- "2C": {tags: []string{"az"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
- "782C": {tags: []string{"az-Latn"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
- "42C": {tags: []string{"az-Latn-AZ"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
- "45": {tags: []string{"bn"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
- "845": {tags: []string{"bn-BD"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
- "445": {tags: []string{"bn-IN"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
- "6D": {tags: []string{"ba"}, localMonth: localMonthsNameBashkir, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBashkir, weekdayNamesAbbr: weekdayNamesBashkirAbbr},
- "46D": {tags: []string{"ba-RU"}, localMonth: localMonthsNameBashkir, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBashkir, weekdayNamesAbbr: weekdayNamesBashkirAbbr},
- "2D": {tags: []string{"eu"}, localMonth: localMonthsNameBasque, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBasque, weekdayNamesAbbr: weekdayNamesBasqueAbbr},
- "42D": {tags: []string{"eu-ES"}, localMonth: localMonthsNameBasque, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBasque, weekdayNamesAbbr: weekdayNamesBasqueAbbr},
- "23": {tags: []string{"be"}, localMonth: localMonthsNameBelarusian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBelarusian, weekdayNamesAbbr: weekdayNamesBelarusianAbbr},
- "423": {tags: []string{"be-BY"}, localMonth: localMonthsNameBelarusian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBelarusian, weekdayNamesAbbr: weekdayNamesBelarusianAbbr},
- "641A": {tags: []string{"bs-Cyrl"}, localMonth: localMonthsNameBosnianCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnianCyrillic, weekdayNamesAbbr: weekdayNamesBosnianCyrillicAbbr},
- "201A": {tags: []string{"bs-Cyrl-BA"}, localMonth: localMonthsNameBosnianCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnianCyrillic, weekdayNamesAbbr: weekdayNamesBosnianCyrillicAbbr},
- "681A": {tags: []string{"bs-Latn"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
- "781A": {tags: []string{"bs"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
- "141A": {tags: []string{"bs-Latn-BA"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
- "7E": {tags: []string{"br"}, localMonth: localMonthsNameBreton, apFmt: apFmtBreton, weekdayNames: weekdayNamesBreton, weekdayNamesAbbr: weekdayNamesBretonAbbr},
- "47E": {tags: []string{"br-FR"}, localMonth: localMonthsNameBreton, apFmt: apFmtBreton, weekdayNames: weekdayNamesBreton, weekdayNamesAbbr: weekdayNamesBretonAbbr},
- "2": {tags: []string{"bg"}, localMonth: localMonthsNameBulgarian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBulgarian, weekdayNamesAbbr: weekdayNamesBulgarianAbbr},
- "402": {tags: []string{"bg-BG"}, localMonth: localMonthsNameBulgarian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBulgarian, weekdayNamesAbbr: weekdayNamesBulgarianAbbr},
- "55": {tags: []string{"my"}, localMonth: localMonthsNameBurmese, apFmt: apFmtBurmese, weekdayNames: weekdayNamesBurmese, weekdayNamesAbbr: weekdayNamesBurmese},
- "455": {tags: []string{"my-MM"}, localMonth: localMonthsNameBurmese, apFmt: apFmtBurmese, weekdayNames: weekdayNamesBurmese, weekdayNamesAbbr: weekdayNamesBurmese},
- "3": {tags: []string{"ca"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
- "403": {tags: []string{"ca-ES"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
- "45F": {tags: []string{"tzm-Arab-MA"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
- "92": {tags: []string{"ku"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
- "7C92": {tags: []string{"ku-Arab"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
- "492": {tags: []string{"ku-Arab-IQ"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
- "5C": {tags: []string{"chr"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
- "7C5C": {tags: []string{"chr-Cher"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
- "45C": {tags: []string{"chr-Cher-US"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
- "4": {tags: []string{"zh-Hans"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "7804": {tags: []string{"zh"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "804": {tags: []string{"zh-CN"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr},
- "1004": {tags: []string{"zh-SG"}, localMonth: localMonthsNameChinese2, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr},
- "7C04": {tags: []string{"zh-Hant"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "C04": {tags: []string{"zh-HK"}, localMonth: localMonthsNameChinese2, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "1404": {tags: []string{"zh-MO"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "404": {tags: []string{"zh-TW"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
- "9": {tags: []string{"en"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "1000": {tags: []string{
+ // supportedLanguageInfo directly maps the supported language decimal ID and tags.
+ supportedLanguageInfo = map[int]languageInfo{
+ 54: {tags: []string{"af"}, localMonth: localMonthsNameAfrikaans, apFmt: apFmtAfrikaans, weekdayNames: weekdayNamesAfrikaans, weekdayNamesAbbr: weekdayNamesAfrikaansAbbr},
+ 1078: {tags: []string{"af-ZA"}, localMonth: localMonthsNameAfrikaans, apFmt: apFmtAfrikaans, weekdayNames: weekdayNamesAfrikaans, weekdayNamesAbbr: weekdayNamesAfrikaansAbbr},
+ 28: {tags: []string{"sq"}, localMonth: localMonthsNameAlbanian, apFmt: apFmtAlbanian, weekdayNames: weekdayNamesAlbanian, weekdayNamesAbbr: weekdayNamesAlbanianAbbr},
+ 1052: {tags: []string{"sq-AL"}, localMonth: localMonthsNameAlbanian, apFmt: apFmtAlbanian, weekdayNames: weekdayNamesAlbanian, weekdayNamesAbbr: weekdayNamesAlbanianAbbr},
+ 132: {tags: []string{"gsw"}, localMonth: localMonthsNameAlsatian, apFmt: apFmtAlsatian, weekdayNames: weekdayNamesAlsatian, weekdayNamesAbbr: weekdayNamesAlsatianAbbr},
+ 1156: {tags: []string{"gsw-FR"}, localMonth: localMonthsNameAlsatianFrance, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAlsatianFrance, weekdayNamesAbbr: weekdayNamesAlsatianFranceAbbr},
+ 94: {tags: []string{"am"}, localMonth: localMonthsNameAmharic, apFmt: apFmtAmharic, weekdayNames: weekdayNamesAmharic, weekdayNamesAbbr: weekdayNamesAmharicAbbr},
+ 1118: {tags: []string{"am-ET"}, localMonth: localMonthsNameAmharic, apFmt: apFmtAmharic, weekdayNames: weekdayNamesAmharic, weekdayNamesAbbr: weekdayNamesAmharicAbbr},
+ 1: {tags: []string{"ar"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 5121: {tags: []string{"ar-DZ"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 15361: {tags: []string{"ar-BH"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 3073: {tags: []string{"ar-EG"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 2049: {tags: []string{"ar-IQ"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 11265: {tags: []string{"ar-JO"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 13313: {tags: []string{"ar-KW"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 12289: {tags: []string{"ar-LB"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 6145: {tags: []string{"ar-MA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 8193: {tags: []string{"ar-OM"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 16385: {tags: []string{"ar-QA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 1025: {tags: []string{"ar-SA"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 10241: {tags: []string{"ar-SY"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 7169: {tags: []string{"ar-TN"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 14337: {tags: []string{"ar-AE"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 9217: {tags: []string{"ar-YE"}, localMonth: localMonthsNameArabic, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 43: {tags: []string{"hy"}, localMonth: localMonthsNameArmenian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesArmenian, weekdayNamesAbbr: weekdayNamesArmenianAbbr},
+ 1067: {tags: []string{"hy-AM"}, localMonth: localMonthsNameArmenian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesArmenian, weekdayNamesAbbr: weekdayNamesArmenianAbbr},
+ 77: {tags: []string{"as"}, localMonth: localMonthsNameAssamese, apFmt: apFmtAssamese, weekdayNames: weekdayNamesAssamese, weekdayNamesAbbr: weekdayNamesAssameseAbbr},
+ 1101: {tags: []string{"as-IN"}, localMonth: localMonthsNameAssamese, apFmt: apFmtAssamese, weekdayNames: weekdayNamesAssamese, weekdayNamesAbbr: weekdayNamesAssameseAbbr},
+ 29740: {tags: []string{"az-Cyrl"}, localMonth: localMonthsNameAzerbaijaniCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijaniCyrillic, weekdayNamesAbbr: weekdayNamesAzerbaijaniCyrillicAbbr},
+ 2092: {tags: []string{"az-Cyrl-AZ"}, localMonth: localMonthsNameAzerbaijaniCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijaniCyrillic, weekdayNamesAbbr: weekdayNamesAzerbaijaniCyrillicAbbr},
+ 44: {tags: []string{"az"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
+ 30764: {tags: []string{"az-Latn"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
+ 1068: {tags: []string{"az-Latn-AZ"}, localMonth: localMonthsNameAzerbaijani, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesAzerbaijani, weekdayNamesAbbr: weekdayNamesAzerbaijaniAbbr},
+ 69: {tags: []string{"bn"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
+ 2117: {tags: []string{"bn-BD"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
+ 1093: {tags: []string{"bn-IN"}, localMonth: localMonthsNameBangla, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBangla, weekdayNamesAbbr: weekdayNamesBanglaAbbr},
+ 109: {tags: []string{"ba"}, localMonth: localMonthsNameBashkir, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBashkir, weekdayNamesAbbr: weekdayNamesBashkirAbbr},
+ 1133: {tags: []string{"ba-RU"}, localMonth: localMonthsNameBashkir, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBashkir, weekdayNamesAbbr: weekdayNamesBashkirAbbr},
+ 45: {tags: []string{"eu"}, localMonth: localMonthsNameBasque, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBasque, weekdayNamesAbbr: weekdayNamesBasqueAbbr},
+ 1069: {tags: []string{"eu-ES"}, localMonth: localMonthsNameBasque, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBasque, weekdayNamesAbbr: weekdayNamesBasqueAbbr},
+ 35: {tags: []string{"be"}, localMonth: localMonthsNameBelarusian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBelarusian, weekdayNamesAbbr: weekdayNamesBelarusianAbbr},
+ 1059: {tags: []string{"be-BY"}, localMonth: localMonthsNameBelarusian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBelarusian, weekdayNamesAbbr: weekdayNamesBelarusianAbbr},
+ 25626: {tags: []string{"bs-Cyrl"}, localMonth: localMonthsNameBosnianCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnianCyrillic, weekdayNamesAbbr: weekdayNamesBosnianCyrillicAbbr},
+ 8218: {tags: []string{"bs-Cyrl-BA"}, localMonth: localMonthsNameBosnianCyrillic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnianCyrillic, weekdayNamesAbbr: weekdayNamesBosnianCyrillicAbbr},
+ 26650: {tags: []string{"bs-Latn"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
+ 30746: {tags: []string{"bs"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
+ 5146: {tags: []string{"bs-Latn-BA"}, localMonth: localMonthsNameBosnian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBosnian, weekdayNamesAbbr: weekdayNamesBosnianAbbr},
+ 126: {tags: []string{"br"}, localMonth: localMonthsNameBreton, apFmt: apFmtBreton, weekdayNames: weekdayNamesBreton, weekdayNamesAbbr: weekdayNamesBretonAbbr},
+ 1150: {tags: []string{"br-FR"}, localMonth: localMonthsNameBreton, apFmt: apFmtBreton, weekdayNames: weekdayNamesBreton, weekdayNamesAbbr: weekdayNamesBretonAbbr},
+ 2: {tags: []string{"bg"}, localMonth: localMonthsNameBulgarian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBulgarian, weekdayNamesAbbr: weekdayNamesBulgarianAbbr},
+ 1026: {tags: []string{"bg-BG"}, localMonth: localMonthsNameBulgarian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesBulgarian, weekdayNamesAbbr: weekdayNamesBulgarianAbbr},
+ 85: {tags: []string{"my"}, localMonth: localMonthsNameBurmese, apFmt: apFmtBurmese, weekdayNames: weekdayNamesBurmese, weekdayNamesAbbr: weekdayNamesBurmese},
+ 1109: {tags: []string{"my-MM"}, localMonth: localMonthsNameBurmese, apFmt: apFmtBurmese, weekdayNames: weekdayNamesBurmese, weekdayNamesAbbr: weekdayNamesBurmese},
+ 3: {tags: []string{"ca"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
+ 1027: {tags: []string{"ca-ES"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
+ 1119: {tags: []string{"tzm-Arab-MA"}, localMonth: localMonthsNameArabicIraq, apFmt: apFmtArabic, weekdayNames: weekdayNamesArabic, weekdayNamesAbbr: weekdayNamesArabicAbbr},
+ 146: {tags: []string{"ku"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
+ 31890: {tags: []string{"ku-Arab"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
+ 1170: {tags: []string{"ku-Arab-IQ"}, localMonth: localMonthsNameCentralKurdish, apFmt: apFmtCentralKurdish, weekdayNames: weekdayNamesCentralKurdish, weekdayNamesAbbr: weekdayNamesCentralKurdish},
+ 92: {tags: []string{"chr"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
+ 31836: {tags: []string{"chr-Cher"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
+ 1116: {tags: []string{"chr-Cher-US"}, localMonth: localMonthsNameCherokee, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesCherokee, weekdayNamesAbbr: weekdayNamesCherokeeAbbr},
+ 4: {tags: []string{"zh-Hans"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 30724: {tags: []string{"zh"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 2052: {tags: []string{"zh-CN"}, localMonth: localMonthsNameChinese1, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr},
+ 4100: {tags: []string{"zh-SG"}, localMonth: localMonthsNameChinese2, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr},
+ 31748: {tags: []string{"zh-Hant"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 3076: {tags: []string{"zh-HK"}, localMonth: localMonthsNameChinese2, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 5124: {tags: []string{"zh-MO"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 1028: {tags: []string{"zh-TW"}, localMonth: localMonthsNameChinese3, apFmt: nfp.AmPm[2], weekdayNames: weekdayNamesChinese, weekdayNamesAbbr: weekdayNamesChineseAbbr2},
+ 9: {tags: []string{"en"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 4096: {tags: []string{
"aa", "aa-DJ", "aa-ER", "aa-ER", "aa-NA", "agq", "agq-CM", "ak", "ak-GH", "sq-ML",
"gsw-LI", "gsw-CH", "ar-TD", "ar-KM", "ar-DJ", "ar-ER", "ar-IL", "ar-MR", "ar-PS",
"ar-SO", "ar-SS", "ar-SD", "ar-001", "ast", "ast-ES", "asa", "asa-TZ", "ksf", "ksf-CM",
@@ -836,333 +838,335 @@ var (
"vai-Vaii-LR", "vai-Latn-LR", "vai-Latn", "vo", "vo-001", "vun", "vun-TZ", "wae",
"wae-CH", "wal", "wae-ET", "yav", "yav-CM", "yo-BJ", "dje", "dje-NE",
}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "C09": {tags: []string{"en-AU"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "2809": {tags: []string{"en-BZ"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "1009": {tags: []string{"en-CA"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "2409": {tags: []string{"en-029"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "3C09": {tags: []string{"en-HK"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "4009": {tags: []string{"en-IN"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "1809": {tags: []string{"en-IE"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "2009": {tags: []string{"en-JM"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "4409": {tags: []string{"en-MY"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "1409": {tags: []string{"en-NZ"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "3409": {tags: []string{"en-PH"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "4809": {tags: []string{"en-SG"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "1C09": {tags: []string{"en-ZA"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "2C09": {tags: []string{"en-TT"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "4C09": {tags: []string{"en-AE"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "809": {tags: []string{"en-GB"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "409": {tags: []string{"en-US"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "3009": {tags: []string{"en-ZW"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "25": {tags: []string{"et"}, localMonth: localMonthsNameEstonian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEstonian, weekdayNamesAbbr: weekdayNamesEstonianAbbr},
- "425": {tags: []string{"et-EE"}, localMonth: localMonthsNameEstonian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEstonian, weekdayNamesAbbr: weekdayNamesEstonianAbbr},
- "38": {tags: []string{"fo"}, localMonth: localMonthsNameFaroese, apFmt: apFmtFaroese, weekdayNames: weekdayNamesFaroese, weekdayNamesAbbr: weekdayNamesFaroeseAbbr},
- "438": {tags: []string{"fo-FO"}, localMonth: localMonthsNameFaroese, apFmt: apFmtFaroese, weekdayNames: weekdayNamesFaroese, weekdayNamesAbbr: weekdayNamesFaroeseAbbr},
- "64": {tags: []string{"fil"}, localMonth: localMonthsNameFilipino, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFilipino, weekdayNamesAbbr: weekdayNamesFilipinoAbbr},
- "464": {tags: []string{"fil-PH"}, localMonth: localMonthsNameFilipino, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFilipino, weekdayNamesAbbr: weekdayNamesFilipinoAbbr},
- "B": {tags: []string{"fi"}, localMonth: localMonthsNameFinnish, apFmt: apFmtFinnish, weekdayNames: weekdayNamesFinnish, weekdayNamesAbbr: weekdayNamesFinnishAbbr},
- "40B": {tags: []string{"fi-FI"}, localMonth: localMonthsNameFinnish, apFmt: apFmtFinnish, weekdayNames: weekdayNamesFinnish, weekdayNamesAbbr: weekdayNamesFinnishAbbr},
- "C": {tags: []string{"fr"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "80C": {tags: []string{"fr-BE"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "2C0C": {tags: []string{"fr-CM"}, localMonth: localMonthsNameFrench, apFmt: apFmtCameroon, weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "C0C": {tags: []string{"fr-CA"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "1C0C": {tags: []string{"fr-029"}, localMonth: localMonthsNameCaribbean, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "240C": {tags: []string{"fr-CD"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "300C": {tags: []string{"fr-CI"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "40C": {tags: []string{"fr-FR"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "3C0C": {tags: []string{"fr-HT"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "140C": {tags: []string{"fr-LU"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "340C": {tags: []string{"fr-ML"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "380C": {tags: []string{"fr-MA"}, localMonth: localMonthsNameMorocco, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "180C": {tags: []string{"fr-MC"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "200C": {tags: []string{"fr-RE"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "280C": {tags: []string{"fr-SN"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
- "62": {tags: []string{"fy"}, localMonth: localMonthsNameFrisian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrisian, weekdayNamesAbbr: weekdayNamesFrisianAbbr},
- "462": {tags: []string{"fy-NL"}, localMonth: localMonthsNameFrisian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrisian, weekdayNamesAbbr: weekdayNamesFrisianAbbr},
- "67": {tags: []string{"ff"}, localMonth: localMonthsNameFulah, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFulah, weekdayNamesAbbr: weekdayNamesFulahAbbr},
- "7C67": {tags: []string{"ff-Latn"}, localMonth: localMonthsNameFulah, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFulah, weekdayNamesAbbr: weekdayNamesFulahAbbr},
- "467": {tags: []string{"ff-NG", "ff-Latn-NG"}, localMonth: localMonthsNameNigeria, apFmt: apFmtNigeria, weekdayNames: weekdayNamesNigeria, weekdayNamesAbbr: weekdayNamesNigeriaAbbr},
- "867": {tags: []string{"ff-SN"}, localMonth: localMonthsNameNigeria, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesNigeria, weekdayNamesAbbr: weekdayNamesNigeriaAbbr},
- "56": {tags: []string{"gl"}, localMonth: localMonthsNameGalician, apFmt: apFmtCuba, weekdayNames: weekdayNamesGalician, weekdayNamesAbbr: weekdayNamesGalicianAbbr},
- "456": {tags: []string{"gl-ES"}, localMonth: localMonthsNameGalician, apFmt: apFmtCuba, weekdayNames: weekdayNamesGalician, weekdayNamesAbbr: weekdayNamesGalicianAbbr},
- "37": {tags: []string{"ka"}, localMonth: localMonthsNameGeorgian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGeorgian, weekdayNamesAbbr: weekdayNamesGeorgianAbbr},
- "437": {tags: []string{"ka-GE"}, localMonth: localMonthsNameGeorgian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGeorgian, weekdayNamesAbbr: weekdayNamesGeorgianAbbr},
- "7": {tags: []string{"de"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
- "C07": {tags: []string{"de-AT"}, localMonth: localMonthsNameAustria, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
- "407": {tags: []string{"de-DE"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
- "1407": {tags: []string{"de-LI"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
- "807": {tags: []string{"de-CH"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
- "8": {tags: []string{"el"}, localMonth: localMonthsNameGreek, apFmt: apFmtGreek, weekdayNames: weekdayNamesGreek, weekdayNamesAbbr: weekdayNamesGreekAbbr},
- "408": {tags: []string{"el-GR"}, localMonth: localMonthsNameGreek, apFmt: apFmtGreek, weekdayNames: weekdayNamesGreek, weekdayNamesAbbr: weekdayNamesGreekAbbr},
- "6F": {tags: []string{"kl"}, localMonth: localMonthsNameGreenlandic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGreenlandic, weekdayNamesAbbr: weekdayNamesGreenlandicAbbr},
- "46F": {tags: []string{"kl-GL"}, localMonth: localMonthsNameGreenlandic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGreenlandic, weekdayNamesAbbr: weekdayNamesGreenlandicAbbr},
- "74": {tags: []string{"gn"}, localMonth: localMonthsNameGuarani, apFmt: apFmtCuba, weekdayNames: weekdayNamesGuarani, weekdayNamesAbbr: weekdayNamesGuaraniAbbr},
- "474": {tags: []string{"gn-PY"}, localMonth: localMonthsNameGuarani, apFmt: apFmtCuba, weekdayNames: weekdayNamesGuarani, weekdayNamesAbbr: weekdayNamesGuaraniAbbr},
- "47": {tags: []string{"gu"}, localMonth: localMonthsNameGujarati, apFmt: apFmtGujarati, weekdayNames: weekdayNamesGujarati, weekdayNamesAbbr: weekdayNamesGujaratiAbbr},
- "447": {tags: []string{"gu-IN"}, localMonth: localMonthsNameGujarati, apFmt: apFmtGujarati, weekdayNames: weekdayNamesGujarati, weekdayNamesAbbr: weekdayNamesGujaratiAbbr},
- "68": {tags: []string{"ha"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
- "7C68": {tags: []string{"ha-Latn"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
- "468": {tags: []string{"ha-Latn-NG"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
- "75": {tags: []string{"haw"}, localMonth: localMonthsNameHawaiian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHawaiian, weekdayNamesAbbr: weekdayNamesHawaiianAbbr},
- "475": {tags: []string{"haw-US"}, localMonth: localMonthsNameHawaiian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHawaiian, weekdayNamesAbbr: weekdayNamesHawaiianAbbr},
- "D": {tags: []string{"he"}, localMonth: localMonthsNameHebrew, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHebrew, weekdayNamesAbbr: weekdayNamesHebrewAbbr},
- "40D": {tags: []string{"he-IL"}, localMonth: localMonthsNameHebrew, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHebrew, weekdayNamesAbbr: weekdayNamesHebrewAbbr},
- "39": {tags: []string{"hi"}, localMonth: localMonthsNameHindi, apFmt: apFmtHindi, weekdayNames: weekdayNamesHindi, weekdayNamesAbbr: weekdayNamesHindiAbbr},
- "439": {tags: []string{"hi-IN"}, localMonth: localMonthsNameHindi, apFmt: apFmtHindi, weekdayNames: weekdayNamesHindi, weekdayNamesAbbr: weekdayNamesHindiAbbr},
- "E": {tags: []string{"hu"}, localMonth: localMonthsNameHungarian, apFmt: apFmtHungarian, weekdayNames: weekdayNamesHungarian, weekdayNamesAbbr: weekdayNamesHungarianAbbr},
- "40E": {tags: []string{"hu-HU"}, localMonth: localMonthsNameHungarian, apFmt: apFmtHungarian, weekdayNames: weekdayNamesHungarian, weekdayNamesAbbr: weekdayNamesHungarianAbbr},
- "F": {tags: []string{"is"}, localMonth: localMonthsNameIcelandic, apFmt: apFmtIcelandic, weekdayNames: weekdayNamesIcelandic, weekdayNamesAbbr: weekdayNamesIcelandicAbbr},
- "40F": {tags: []string{"is-IS"}, localMonth: localMonthsNameIcelandic, apFmt: apFmtIcelandic, weekdayNames: weekdayNamesIcelandic, weekdayNamesAbbr: weekdayNamesIcelandicAbbr},
- "70": {tags: []string{"ig"}, localMonth: localMonthsNameIgbo, apFmt: apFmtIgbo, weekdayNames: weekdayNamesIgbo, weekdayNamesAbbr: weekdayNamesIgboAbbr},
- "470": {tags: []string{"ig-NG"}, localMonth: localMonthsNameIgbo, apFmt: apFmtIgbo, weekdayNames: weekdayNamesIgbo, weekdayNamesAbbr: weekdayNamesIgboAbbr},
- "21": {tags: []string{"id"}, localMonth: localMonthsNameIndonesian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesIndonesian, weekdayNamesAbbr: weekdayNamesIndonesianAbbr},
- "421": {tags: []string{"id-ID"}, localMonth: localMonthsNameIndonesian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesIndonesian, weekdayNamesAbbr: weekdayNamesIndonesianAbbr},
- "5D": {tags: []string{"iu"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
- "7C5D": {tags: []string{"iu-Latn"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
- "85D": {tags: []string{"iu-Latn-CA"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
- "785D": {tags: []string{"iu-Cans"}, localMonth: localMonthsNameSyllabics, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSyllabics, weekdayNamesAbbr: weekdayNamesSyllabicsAbbr},
- "45D": {tags: []string{"iu-Cans-CA"}, localMonth: localMonthsNameSyllabics, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSyllabics, weekdayNamesAbbr: weekdayNamesSyllabicsAbbr},
- "3C": {tags: []string{"ga"}, localMonth: localMonthsNameIrish, apFmt: apFmtIrish, weekdayNames: weekdayNamesIrish, weekdayNamesAbbr: weekdayNamesIrishAbbr},
- "83C": {tags: []string{"ga-IE"}, localMonth: localMonthsNameIrish, apFmt: apFmtIrish, weekdayNames: weekdayNamesIrish, weekdayNamesAbbr: weekdayNamesIrishAbbr},
- "10": {tags: []string{"it"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
- "410": {tags: []string{"it-IT"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
- "810": {tags: []string{"it-CH"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
- "11": {tags: []string{"ja"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
- "411": {tags: []string{"ja-JP"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
- "800411": {tags: []string{"ja-JP"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
+ 3081: {tags: []string{"en-AU"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 10249: {tags: []string{"en-BZ"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 4105: {tags: []string{"en-CA"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 9225: {tags: []string{"en-029"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 15369: {tags: []string{"en-HK"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 16393: {tags: []string{"en-IN"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 6153: {tags: []string{"en-IE"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 8201: {tags: []string{"en-JM"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 17417: {tags: []string{"en-MY"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 5129: {tags: []string{"en-NZ"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 13321: {tags: []string{"en-PH"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 18441: {tags: []string{"en-SG"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 7177: {tags: []string{"en-ZA"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 11273: {tags: []string{"en-TT"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 19465: {tags: []string{"en-AE"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 2057: {tags: []string{"en-GB"}, localMonth: localMonthsNameEnglish, apFmt: strings.ToLower(nfp.AmPm[0]), weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 1033: {tags: []string{"en-US"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 12297: {tags: []string{"en-ZW"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 37: {tags: []string{"et"}, localMonth: localMonthsNameEstonian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEstonian, weekdayNamesAbbr: weekdayNamesEstonianAbbr},
+ 1061: {tags: []string{"et-EE"}, localMonth: localMonthsNameEstonian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEstonian, weekdayNamesAbbr: weekdayNamesEstonianAbbr},
+ 56: {tags: []string{"fo"}, localMonth: localMonthsNameFaroese, apFmt: apFmtFaroese, weekdayNames: weekdayNamesFaroese, weekdayNamesAbbr: weekdayNamesFaroeseAbbr},
+ 1080: {tags: []string{"fo-FO"}, localMonth: localMonthsNameFaroese, apFmt: apFmtFaroese, weekdayNames: weekdayNamesFaroese, weekdayNamesAbbr: weekdayNamesFaroeseAbbr},
+ 100: {tags: []string{"fil"}, localMonth: localMonthsNameFilipino, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFilipino, weekdayNamesAbbr: weekdayNamesFilipinoAbbr},
+ 1124: {tags: []string{"fil-PH"}, localMonth: localMonthsNameFilipino, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFilipino, weekdayNamesAbbr: weekdayNamesFilipinoAbbr},
+ 11: {tags: []string{"fi"}, localMonth: localMonthsNameFinnish, apFmt: apFmtFinnish, weekdayNames: weekdayNamesFinnish, weekdayNamesAbbr: weekdayNamesFinnishAbbr},
+ 1035: {tags: []string{"fi-FI"}, localMonth: localMonthsNameFinnish, apFmt: apFmtFinnish, weekdayNames: weekdayNamesFinnish, weekdayNamesAbbr: weekdayNamesFinnishAbbr},
+ 12: {tags: []string{"fr"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 2060: {tags: []string{"fr-BE"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 11276: {tags: []string{"fr-CM"}, localMonth: localMonthsNameFrench, apFmt: apFmtCameroon, weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 3084: {tags: []string{"fr-CA"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 7180: {tags: []string{"fr-029"}, localMonth: localMonthsNameCaribbean, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 9228: {tags: []string{"fr-CD"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 12300: {tags: []string{"fr-CI"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 1036: {tags: []string{"fr-FR"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 15372: {tags: []string{"fr-HT"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 5132: {tags: []string{"fr-LU"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 13324: {tags: []string{"fr-ML"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 14348: {tags: []string{"fr-MA"}, localMonth: localMonthsNameMorocco, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 6156: {tags: []string{"fr-MC"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 8204: {tags: []string{"fr-RE"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 10252: {tags: []string{"fr-SN"}, localMonth: localMonthsNameFrench, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrench, weekdayNamesAbbr: weekdayNamesFrenchAbbr},
+ 98: {tags: []string{"fy"}, localMonth: localMonthsNameFrisian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrisian, weekdayNamesAbbr: weekdayNamesFrisianAbbr},
+ 1122: {tags: []string{"fy-NL"}, localMonth: localMonthsNameFrisian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFrisian, weekdayNamesAbbr: weekdayNamesFrisianAbbr},
+ 103: {tags: []string{"ff"}, localMonth: localMonthsNameFulah, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFulah, weekdayNamesAbbr: weekdayNamesFulahAbbr},
+ 31847: {tags: []string{"ff-Latn"}, localMonth: localMonthsNameFulah, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesFulah, weekdayNamesAbbr: weekdayNamesFulahAbbr},
+ 1127: {tags: []string{"ff-NG", "ff-Latn-NG"}, localMonth: localMonthsNameNigeria, apFmt: apFmtNigeria, weekdayNames: weekdayNamesNigeria, weekdayNamesAbbr: weekdayNamesNigeriaAbbr},
+ 2151: {tags: []string{"ff-SN"}, localMonth: localMonthsNameNigeria, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesNigeria, weekdayNamesAbbr: weekdayNamesNigeriaAbbr},
+ 86: {tags: []string{"gl"}, localMonth: localMonthsNameGalician, apFmt: apFmtCuba, weekdayNames: weekdayNamesGalician, weekdayNamesAbbr: weekdayNamesGalicianAbbr},
+ 1110: {tags: []string{"gl-ES"}, localMonth: localMonthsNameGalician, apFmt: apFmtCuba, weekdayNames: weekdayNamesGalician, weekdayNamesAbbr: weekdayNamesGalicianAbbr},
+ 55: {tags: []string{"ka"}, localMonth: localMonthsNameGeorgian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGeorgian, weekdayNamesAbbr: weekdayNamesGeorgianAbbr},
+ 1079: {tags: []string{"ka-GE"}, localMonth: localMonthsNameGeorgian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGeorgian, weekdayNamesAbbr: weekdayNamesGeorgianAbbr},
+ 7: {tags: []string{"de"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
+ 3079: {tags: []string{"de-AT"}, localMonth: localMonthsNameAustria, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
+ 1031: {tags: []string{"de-DE"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
+ 5127: {tags: []string{"de-LI"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
+ 2055: {tags: []string{"de-CH"}, localMonth: localMonthsNameGerman, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGerman, weekdayNamesAbbr: weekdayNamesGermanAbbr},
+ 8: {tags: []string{"el"}, localMonth: localMonthsNameGreek, apFmt: apFmtGreek, weekdayNames: weekdayNamesGreek, weekdayNamesAbbr: weekdayNamesGreekAbbr},
+ 1032: {tags: []string{"el-GR"}, localMonth: localMonthsNameGreek, apFmt: apFmtGreek, weekdayNames: weekdayNamesGreek, weekdayNamesAbbr: weekdayNamesGreekAbbr},
+ 111: {tags: []string{"kl"}, localMonth: localMonthsNameGreenlandic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGreenlandic, weekdayNamesAbbr: weekdayNamesGreenlandicAbbr},
+ 1135: {tags: []string{"kl-GL"}, localMonth: localMonthsNameGreenlandic, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesGreenlandic, weekdayNamesAbbr: weekdayNamesGreenlandicAbbr},
+ 116: {tags: []string{"gn"}, localMonth: localMonthsNameGuarani, apFmt: apFmtCuba, weekdayNames: weekdayNamesGuarani, weekdayNamesAbbr: weekdayNamesGuaraniAbbr},
+ 1140: {tags: []string{"gn-PY"}, localMonth: localMonthsNameGuarani, apFmt: apFmtCuba, weekdayNames: weekdayNamesGuarani, weekdayNamesAbbr: weekdayNamesGuaraniAbbr},
+ 71: {tags: []string{"gu"}, localMonth: localMonthsNameGujarati, apFmt: apFmtGujarati, weekdayNames: weekdayNamesGujarati, weekdayNamesAbbr: weekdayNamesGujaratiAbbr},
+ 1095: {tags: []string{"gu-IN"}, localMonth: localMonthsNameGujarati, apFmt: apFmtGujarati, weekdayNames: weekdayNamesGujarati, weekdayNamesAbbr: weekdayNamesGujaratiAbbr},
+ 104: {tags: []string{"ha"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
+ 31848: {tags: []string{"ha-Latn"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
+ 1128: {tags: []string{"ha-Latn-NG"}, localMonth: localMonthsNameHausa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHausa, weekdayNamesAbbr: weekdayNamesHausaAbbr},
+ 117: {tags: []string{"haw"}, localMonth: localMonthsNameHawaiian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHawaiian, weekdayNamesAbbr: weekdayNamesHawaiianAbbr},
+ 1141: {tags: []string{"haw-US"}, localMonth: localMonthsNameHawaiian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHawaiian, weekdayNamesAbbr: weekdayNamesHawaiianAbbr},
+ 13: {tags: []string{"he"}, localMonth: localMonthsNameHebrew, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHebrew, weekdayNamesAbbr: weekdayNamesHebrewAbbr},
+ 1037: {tags: []string{"he-IL"}, localMonth: localMonthsNameHebrew, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesHebrew, weekdayNamesAbbr: weekdayNamesHebrewAbbr},
+ 57: {tags: []string{"hi"}, localMonth: localMonthsNameHindi, apFmt: apFmtHindi, weekdayNames: weekdayNamesHindi, weekdayNamesAbbr: weekdayNamesHindiAbbr},
+ 1081: {tags: []string{"hi-IN"}, localMonth: localMonthsNameHindi, apFmt: apFmtHindi, weekdayNames: weekdayNamesHindi, weekdayNamesAbbr: weekdayNamesHindiAbbr},
+ 14: {tags: []string{"hu"}, localMonth: localMonthsNameHungarian, apFmt: apFmtHungarian, weekdayNames: weekdayNamesHungarian, weekdayNamesAbbr: weekdayNamesHungarianAbbr},
+ 1038: {tags: []string{"hu-HU"}, localMonth: localMonthsNameHungarian, apFmt: apFmtHungarian, weekdayNames: weekdayNamesHungarian, weekdayNamesAbbr: weekdayNamesHungarianAbbr},
+ 15: {tags: []string{"is"}, localMonth: localMonthsNameIcelandic, apFmt: apFmtIcelandic, weekdayNames: weekdayNamesIcelandic, weekdayNamesAbbr: weekdayNamesIcelandicAbbr},
+ 1039: {tags: []string{"is-IS"}, localMonth: localMonthsNameIcelandic, apFmt: apFmtIcelandic, weekdayNames: weekdayNamesIcelandic, weekdayNamesAbbr: weekdayNamesIcelandicAbbr},
+ 112: {tags: []string{"ig"}, localMonth: localMonthsNameIgbo, apFmt: apFmtIgbo, weekdayNames: weekdayNamesIgbo, weekdayNamesAbbr: weekdayNamesIgboAbbr},
+ 1136: {tags: []string{"ig-NG"}, localMonth: localMonthsNameIgbo, apFmt: apFmtIgbo, weekdayNames: weekdayNamesIgbo, weekdayNamesAbbr: weekdayNamesIgboAbbr},
+ 33: {tags: []string{"id"}, localMonth: localMonthsNameIndonesian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesIndonesian, weekdayNamesAbbr: weekdayNamesIndonesianAbbr},
+ 1057: {tags: []string{"id-ID"}, localMonth: localMonthsNameIndonesian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesIndonesian, weekdayNamesAbbr: weekdayNamesIndonesianAbbr},
+ 93: {tags: []string{"iu"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
+ 31837: {tags: []string{"iu-Latn"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
+ 2141: {tags: []string{"iu-Latn-CA"}, localMonth: localMonthsNameInuktitut, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesInuktitut, weekdayNamesAbbr: weekdayNamesInuktitutAbbr},
+ 30813: {tags: []string{"iu-Cans"}, localMonth: localMonthsNameSyllabics, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSyllabics, weekdayNamesAbbr: weekdayNamesSyllabicsAbbr},
+ 1117: {tags: []string{"iu-Cans-CA"}, localMonth: localMonthsNameSyllabics, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSyllabics, weekdayNamesAbbr: weekdayNamesSyllabicsAbbr},
+ 60: {tags: []string{"ga"}, localMonth: localMonthsNameIrish, apFmt: apFmtIrish, weekdayNames: weekdayNamesIrish, weekdayNamesAbbr: weekdayNamesIrishAbbr},
+ 2108: {tags: []string{"ga-IE"}, localMonth: localMonthsNameIrish, apFmt: apFmtIrish, weekdayNames: weekdayNamesIrish, weekdayNamesAbbr: weekdayNamesIrishAbbr},
+ 16: {tags: []string{"it"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
+ 1040: {tags: []string{"it-IT"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
+ 2064: {tags: []string{"it-CH"}, localMonth: localMonthsNameItalian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesItalian, weekdayNamesAbbr: weekdayNamesItalianAbbr},
+ 17: {tags: []string{"ja"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
+ 1041: {tags: []string{"ja-JP"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
+ 75: {tags: []string{"kn"}, localMonth: localMonthsNameKannada, apFmt: apFmtKannada, weekdayNames: weekdayNamesKannada, weekdayNamesAbbr: weekdayNamesKannadaAbbr},
+ 1099: {tags: []string{"kn-IN"}, localMonth: localMonthsNameKannada, apFmt: apFmtKannada, weekdayNames: weekdayNamesKannada, weekdayNamesAbbr: weekdayNamesKannadaAbbr},
+ 1137: {tags: []string{"kr-Latn-NG"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 96: {tags: []string{"ks"}, localMonth: localMonthsNameKashmiri, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKashmiri, weekdayNamesAbbr: weekdayNamesKashmiriAbbr},
+ 1120: {tags: []string{"ks-Arab"}, localMonth: localMonthsNameKashmiri, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKashmiri, weekdayNamesAbbr: weekdayNamesKashmiriAbbr},
+ 2144: {tags: []string{"ks-Deva-IN"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 63: {tags: []string{"kk"}, localMonth: localMonthsNameKazakh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKazakh, weekdayNamesAbbr: weekdayNamesKazakhAbbr},
+ 1087: {tags: []string{"kk-KZ"}, localMonth: localMonthsNameKazakh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKazakh, weekdayNamesAbbr: weekdayNamesKazakhAbbr},
+ 83: {tags: []string{"km"}, localMonth: localMonthsNameKhmer, apFmt: apFmtKhmer, weekdayNames: weekdayNamesKhmer, weekdayNamesAbbr: weekdayNamesKhmerAbbr},
+ 1107: {tags: []string{"km-KH"}, localMonth: localMonthsNameKhmer, apFmt: apFmtKhmer, weekdayNames: weekdayNamesKhmer, weekdayNamesAbbr: weekdayNamesKhmerAbbr},
+ 134: {tags: []string{"quc"}, localMonth: localMonthsNameKiche, apFmt: apFmtCuba, weekdayNames: weekdayNamesKiche, weekdayNamesAbbr: weekdayNamesKicheAbbr},
+ 1158: {tags: []string{"quc-Latn-GT"}, localMonth: localMonthsNameKiche, apFmt: apFmtCuba, weekdayNames: weekdayNamesKiche, weekdayNamesAbbr: weekdayNamesKicheAbbr},
+ 135: {tags: []string{"rw"}, localMonth: localMonthsNameKinyarwanda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKinyarwanda, weekdayNamesAbbr: weekdayNamesKinyarwandaAbbr},
+ 1159: {tags: []string{"rw-RW"}, localMonth: localMonthsNameKinyarwanda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKinyarwanda, weekdayNamesAbbr: weekdayNamesKinyarwandaAbbr},
+ 65: {tags: []string{"sw"}, localMonth: localMonthsNameKiswahili, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKiswahili, weekdayNamesAbbr: weekdayNamesKiswahiliAbbr},
+ 1089: {tags: []string{"sw-KE"}, localMonth: localMonthsNameKiswahili, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKiswahili, weekdayNamesAbbr: weekdayNamesKiswahiliAbbr},
+ 87: {tags: []string{"kok"}, localMonth: localMonthsNameKonkani, apFmt: apFmtKonkani, weekdayNames: weekdayNamesKonkani, weekdayNamesAbbr: weekdayNamesKonkaniAbbr},
+ 1111: {tags: []string{"kok-IN"}, localMonth: localMonthsNameKonkani, apFmt: apFmtKonkani, weekdayNames: weekdayNamesKonkani, weekdayNamesAbbr: weekdayNamesKonkaniAbbr},
+ 18: {tags: []string{"ko"}, localMonth: localMonthsNameKorean, apFmt: apFmtKorean, weekdayNames: weekdayNamesKorean, weekdayNamesAbbr: weekdayNamesKoreanAbbr},
+ 1042: {tags: []string{"ko-KR"}, localMonth: localMonthsNameKorean, apFmt: apFmtKorean, weekdayNames: weekdayNamesKorean, weekdayNamesAbbr: weekdayNamesKoreanAbbr},
+ 64: {tags: []string{"ky"}, localMonth: localMonthsNameKyrgyz, apFmt: apFmtKyrgyz, weekdayNames: weekdayNamesKyrgyz, weekdayNamesAbbr: weekdayNamesKyrgyzAbbr},
+ 1088: {tags: []string{"ky-KG"}, localMonth: localMonthsNameKyrgyz, apFmt: apFmtKyrgyz, weekdayNames: weekdayNamesKyrgyz, weekdayNamesAbbr: weekdayNamesKyrgyzAbbr},
+ 84: {tags: []string{"lo"}, localMonth: localMonthsNameLao, apFmt: apFmtLao, weekdayNames: weekdayNamesLao, weekdayNamesAbbr: weekdayNamesLaoAbbr},
+ 1108: {tags: []string{"lo-LA"}, localMonth: localMonthsNameLao, apFmt: apFmtLao, weekdayNames: weekdayNamesLao, weekdayNamesAbbr: weekdayNamesLaoAbbr},
+ 1142: {tags: []string{"la-VA"}, localMonth: localMonthsNameLatin, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLatin, weekdayNamesAbbr: weekdayNamesLatinAbbr},
+ 38: {tags: []string{"lv"}, localMonth: localMonthsNameLatvian, apFmt: apFmtLatvian, weekdayNames: weekdayNamesLatvian, weekdayNamesAbbr: weekdayNamesLatvianAbbr},
+ 1062: {tags: []string{"lv-LV"}, localMonth: localMonthsNameLatvian, apFmt: apFmtLatvian, weekdayNames: weekdayNamesLatvian, weekdayNamesAbbr: weekdayNamesLatvianAbbr},
+ 39: {tags: []string{"lt"}, localMonth: localMonthsNameLithuanian, apFmt: apFmtLithuanian, weekdayNames: weekdayNamesLithuanian, weekdayNamesAbbr: weekdayNamesLithuanianAbbr},
+ 1063: {tags: []string{"lt-LT"}, localMonth: localMonthsNameLithuanian, apFmt: apFmtLithuanian, weekdayNames: weekdayNamesLithuanian, weekdayNamesAbbr: weekdayNamesLithuanianAbbr},
+ 31790: {tags: []string{"dsb"}, localMonth: localMonthsNameLowerSorbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLowerSorbian, weekdayNamesAbbr: weekdayNamesLowerSorbianAbbr},
+ 2094: {tags: []string{"dsb-DE"}, localMonth: localMonthsNameLowerSorbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLowerSorbian, weekdayNamesAbbr: weekdayNamesLowerSorbianAbbr},
+ 110: {tags: []string{"lb"}, localMonth: localMonthsNameLuxembourgish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLuxembourgish, weekdayNamesAbbr: weekdayNamesLuxembourgishAbbr},
+ 1134: {tags: []string{"lb-LU"}, localMonth: localMonthsNameLuxembourgish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLuxembourgish, weekdayNamesAbbr: weekdayNamesLuxembourgishAbbr},
+ 47: {tags: []string{"mk"}, localMonth: localMonthsNameMacedonian, apFmt: apFmtMacedonian, weekdayNames: weekdayNamesMacedonian, weekdayNamesAbbr: weekdayNamesMacedonianAbbr},
+ 1071: {tags: []string{"mk-MK"}, localMonth: localMonthsNameMacedonian, apFmt: apFmtMacedonian, weekdayNames: weekdayNamesMacedonian, weekdayNamesAbbr: weekdayNamesMacedonianAbbr},
+ 62: {tags: []string{"ms"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
+ 2110: {tags: []string{"ms-BN"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
+ 1086: {tags: []string{"ms-MY"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
+ 76: {tags: []string{"ml"}, localMonth: localMonthsNameMalayalam, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMalayalam, weekdayNamesAbbr: weekdayNamesMalayalamAbbr},
+ 1100: {tags: []string{"ml-IN"}, localMonth: localMonthsNameMalayalam, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMalayalam, weekdayNamesAbbr: weekdayNamesMalayalamAbbr},
+ 58: {tags: []string{"mt"}, localMonth: localMonthsNameMaltese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMaltese, weekdayNamesAbbr: weekdayNamesMalteseAbbr},
+ 1082: {tags: []string{"mt-MT"}, localMonth: localMonthsNameMaltese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMaltese, weekdayNamesAbbr: weekdayNamesMalteseAbbr},
+ 129: {tags: []string{"mi"}, localMonth: localMonthsNameMaori, apFmt: apFmtCuba, weekdayNames: weekdayNamesMaori, weekdayNamesAbbr: weekdayNamesMaoriAbbr},
+ 1153: {tags: []string{"mi-NZ"}, localMonth: localMonthsNameMaori, apFmt: apFmtCuba, weekdayNames: weekdayNamesMaori, weekdayNamesAbbr: weekdayNamesMaoriAbbr},
+ 122: {tags: []string{"arn"}, localMonth: localMonthsNameMapudungun, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMapudungun, weekdayNamesAbbr: weekdayNamesMapudungunAbbr},
+ 1146: {tags: []string{"arn-CL"}, localMonth: localMonthsNameMapudungun, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMapudungun, weekdayNamesAbbr: weekdayNamesMapudungunAbbr},
+ 78: {tags: []string{"mr"}, localMonth: localMonthsNameMarathi, apFmt: apFmtKonkani, weekdayNames: weekdayNamesMarathi, weekdayNamesAbbr: weekdayNamesMarathiAbbr},
+ 1102: {tags: []string{"mr-IN"}, localMonth: localMonthsNameMarathi, apFmt: apFmtKonkani, weekdayNames: weekdayNamesMarathi, weekdayNamesAbbr: weekdayNamesMarathiAbbr},
+ 124: {tags: []string{"moh"}, localMonth: localMonthsNameMohawk, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMohawk, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 1148: {tags: []string{"moh-CA"}, localMonth: localMonthsNameMohawk, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMohawk, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
+ 80: {tags: []string{"mn"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianAbbr},
+ 30800: {tags: []string{"mn-Cyrl"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianCyrlAbbr},
+ 1104: {tags: []string{"mn-MN"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianCyrlAbbr},
+ 31824: {tags: []string{"mn-Mong"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolian, weekdayNamesAbbr: weekdayNamesTraditionalMongolian},
+ 2128: {tags: []string{"mn-Mong-CN"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolian, weekdayNamesAbbr: weekdayNamesTraditionalMongolian},
+ 3152: {tags: []string{"mn-Mong-MN"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolianMN, weekdayNamesAbbr: weekdayNamesTraditionalMongolianMN},
+ 97: {tags: []string{"ne"}, localMonth: localMonthsNameNepali, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepali, weekdayNamesAbbr: weekdayNamesNepaliAbbr},
+ 2145: {tags: []string{"ne-IN"}, localMonth: localMonthsNameNepaliIN, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepaliIN, weekdayNamesAbbr: weekdayNamesNepaliINAbbr},
+ 1121: {tags: []string{"ne-NP"}, localMonth: localMonthsNameNepali, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepali, weekdayNamesAbbr: weekdayNamesNepaliAbbr},
+ 20: {tags: []string{"no"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianAbbr},
+ 31764: {tags: []string{"nb"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianNOAbbr},
+ 1044: {tags: []string{"nb-NO"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianNOAbbr},
+ 30740: {tags: []string{"nn"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtNorwegian, weekdayNames: weekdayNamesNorwegianNynorsk, weekdayNamesAbbr: weekdayNamesNorwegianNynorskAbbr},
+ 2068: {tags: []string{"nn-NO"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtNorwegian, weekdayNames: weekdayNamesNorwegianNynorsk, weekdayNamesAbbr: weekdayNamesNorwegianNynorskAbbr},
+ 130: {tags: []string{"oc"}, localMonth: localMonthsNameOccitan, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOccitan, weekdayNamesAbbr: weekdayNamesOccitanAbbr},
+ 1154: {tags: []string{"oc-FR"}, localMonth: localMonthsNameOccitan, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOccitan, weekdayNamesAbbr: weekdayNamesOccitanAbbr},
+ 72: {tags: []string{"or"}, localMonth: localMonthsNameOdia, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOdia, weekdayNamesAbbr: weekdayNamesOdiaAbbr},
+ 1096: {tags: []string{"or-IN"}, localMonth: localMonthsNameOdia, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOdia, weekdayNamesAbbr: weekdayNamesOdiaAbbr},
+ 114: {tags: []string{"om"}, localMonth: localMonthsNameOromo, apFmt: apFmtOromo, weekdayNames: weekdayNamesOromo, weekdayNamesAbbr: weekdayNamesOromoAbbr},
+ 1138: {tags: []string{"om-ET"}, localMonth: localMonthsNameOromo, apFmt: apFmtOromo, weekdayNames: weekdayNamesOromo, weekdayNamesAbbr: weekdayNamesOromoAbbr},
+ 99: {tags: []string{"ps"}, localMonth: localMonthsNamePashto, apFmt: apFmtPashto, weekdayNames: weekdayNamesPashto, weekdayNamesAbbr: weekdayNamesPashto},
+ 1123: {tags: []string{"ps-AF"}, localMonth: localMonthsNamePashto, apFmt: apFmtPashto, weekdayNames: weekdayNamesPashto, weekdayNamesAbbr: weekdayNamesPashto},
+ 41: {tags: []string{"fa"}, localMonth: localMonthsNamePersian, apFmt: apFmtPersian, weekdayNames: weekdayNamesPersian, weekdayNamesAbbr: weekdayNamesPersian},
+ 1065: {tags: []string{"fa-IR"}, localMonth: localMonthsNamePersian, apFmt: apFmtPersian, weekdayNames: weekdayNamesPersian, weekdayNamesAbbr: weekdayNamesPersian},
+ 21: {tags: []string{"pl"}, localMonth: localMonthsNamePolish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPolish, weekdayNamesAbbr: weekdayNamesPolishAbbr},
+ 1045: {tags: []string{"pl-PL"}, localMonth: localMonthsNamePolish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPolish, weekdayNamesAbbr: weekdayNamesPolishAbbr},
+ 22: {tags: []string{"pt"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
+ 1046: {tags: []string{"pt-BR"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
+ 2070: {tags: []string{"pt-PT"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
+ 70: {tags: []string{"pa"}, localMonth: localMonthsNamePunjabi, apFmt: apFmtPunjabi, weekdayNames: weekdayNamesPunjabi, weekdayNamesAbbr: weekdayNamesPunjabiAbbr},
+ 31814: {tags: []string{"pa-Arab"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPunjabiArab, weekdayNamesAbbr: weekdayNamesPunjabiArab},
+ 1094: {tags: []string{"pa-IN"}, localMonth: localMonthsNamePunjabi, apFmt: apFmtPunjabi, weekdayNames: weekdayNamesPunjabi, weekdayNamesAbbr: weekdayNamesPunjabiAbbr},
+ 2118: {tags: []string{"pa-Arab-PK"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPunjabiArab, weekdayNamesAbbr: weekdayNamesPunjabiArab},
+ 107: {tags: []string{"quz"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechua, weekdayNamesAbbr: weekdayNamesQuechuaAbbr},
+ 1131: {tags: []string{"quz-BO"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechua, weekdayNamesAbbr: weekdayNamesQuechuaAbbr},
+ 2155: {tags: []string{"quz-EC"}, localMonth: localMonthsNameQuechuaEcuador, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesQuechuaEcuador, weekdayNamesAbbr: weekdayNamesQuechuaEcuadorAbbr},
+ 3179: {tags: []string{"quz-PE"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechuaPeru, weekdayNamesAbbr: weekdayNamesQuechuaPeruAbbr},
+ 24: {tags: []string{"ro"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianAbbr},
+ 2072: {tags: []string{"ro-MD"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianMoldovaAbbr},
+ 1048: {tags: []string{"ro-RO"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianAbbr},
+ 23: {tags: []string{"rm"}, localMonth: localMonthsNameRomansh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRomansh, weekdayNamesAbbr: weekdayNamesRomanshAbbr},
+ 1047: {tags: []string{"rm-CH"}, localMonth: localMonthsNameRomansh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRomansh, weekdayNamesAbbr: weekdayNamesRomanshAbbr},
+ 25: {tags: []string{"ru"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
+ 2073: {tags: []string{"ru-MD"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
+ 1049: {tags: []string{"ru-RU"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
+ 133: {tags: []string{"sah"}, localMonth: localMonthsNameSakha, apFmt: apFmtSakha, weekdayNames: weekdayNamesSakha, weekdayNamesAbbr: weekdayNamesSakhaAbbr},
+ 1157: {tags: []string{"sah-RU"}, localMonth: localMonthsNameSakha, apFmt: apFmtSakha, weekdayNames: weekdayNamesSakha, weekdayNamesAbbr: weekdayNamesSakhaAbbr},
+ 28731: {tags: []string{"smn"}, localMonth: localMonthsNameSami, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSami, weekdayNamesAbbr: weekdayNamesSamiAbbr},
+ 9275: {tags: []string{"smn-FI"}, localMonth: localMonthsNameSami, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSami, weekdayNamesAbbr: weekdayNamesSamiAbbr},
+ 31803: {tags: []string{"smj"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSamiLule, weekdayNamesAbbr: weekdayNamesSamiSwedenAbbr},
+ 4155: {tags: []string{"smj-NO"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSamiLule, weekdayNamesAbbr: weekdayNamesSamiSamiLuleAbbr},
+ 5179: {tags: []string{"smj-SE"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSweden, weekdayNamesAbbr: weekdayNamesSamiSwedenAbbr},
+ 59: {tags: []string{"se"}, localMonth: localMonthsNameSamiNorthern, apFmt: apFmtSamiNorthern, weekdayNames: weekdayNamesSamiNorthern, weekdayNamesAbbr: weekdayNamesSamiNorthernAbbr},
+ 3131: {tags: []string{"se-FI"}, localMonth: localMonthsNameSamiNorthernFI, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiNorthernFI, weekdayNamesAbbr: weekdayNamesSamiNorthernFIAbbr},
+ 1083: {tags: []string{"se-NO"}, localMonth: localMonthsNameSamiNorthern, apFmt: apFmtSamiNorthern, weekdayNames: weekdayNamesSamiNorthern, weekdayNamesAbbr: weekdayNamesSamiNorthernAbbr},
+ 2107: {tags: []string{"se-SE"}, localMonth: localMonthsNameSamiNorthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiNorthernSE, weekdayNamesAbbr: weekdayNamesSamiNorthernSEAbbr},
+ 29755: {tags: []string{"sms"}, localMonth: localMonthsNameSamiSkolt, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSkolt, weekdayNamesAbbr: weekdayNamesSamiSkoltAbbr},
+ 8251: {tags: []string{"sms-FI"}, localMonth: localMonthsNameSamiSkolt, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSkolt, weekdayNamesAbbr: weekdayNamesSamiSkoltAbbr},
+ 30779: {tags: []string{"sma"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
+ 6203: {tags: []string{"sma-NO"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
+ 7227: {tags: []string{"sma-SE"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
+ 79: {tags: []string{"sa"}, localMonth: localMonthsNameSanskrit, apFmt: apFmtSanskrit, weekdayNames: weekdayNamesSanskrit, weekdayNamesAbbr: weekdayNamesSanskritAbbr},
+ 1103: {tags: []string{"sa-IN"}, localMonth: localMonthsNameSanskrit, apFmt: apFmtSanskrit, weekdayNames: weekdayNamesSanskrit, weekdayNamesAbbr: weekdayNamesSanskritAbbr},
+ 145: {tags: []string{"gd"}, localMonth: localMonthsNameScottishGaelic, apFmt: apFmtScottishGaelic, weekdayNames: weekdayNamesGaelic, weekdayNamesAbbr: weekdayNamesGaelicAbbr},
+ 1169: {tags: []string{"gd-GB"}, localMonth: localMonthsNameScottishGaelic, apFmt: apFmtScottishGaelic, weekdayNames: weekdayNamesGaelic, weekdayNamesAbbr: weekdayNamesGaelicAbbr},
+ 27674: {tags: []string{"sr-Cyrl"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
+ 7194: {tags: []string{"sr-Cyrl-BA"}, localMonth: localMonthsNameSerbianBA, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianBA, weekdayNamesAbbr: weekdayNamesSerbianBAAbbr},
+ 12314: {tags: []string{"sr-Cyrl-ME"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianME, weekdayNamesAbbr: weekdayNamesSerbianBAAbbr},
+ 10266: {tags: []string{"sr-Cyrl-RS"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
+ 3098: {tags: []string{"sr-Cyrl-CS"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
+ 28698: {tags: []string{"sr-Latn"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
+ 31770: {tags: []string{"sr"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
+ 6170: {tags: []string{"sr-Latn-BA"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatinBA, weekdayNames: weekdayNamesSerbianLatinBA, weekdayNamesAbbr: weekdayNamesSerbianLatinBAAbbr},
+ 11290: {tags: []string{"sr-Latn-ME"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatinBA, weekdayNames: weekdayNamesSerbianLatinME, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
+ 9242: {tags: []string{"sr-Latn-RS"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
+ 2074: {tags: []string{"sr-Latn-CS"}, localMonth: localMonthsNameSerbianLatinCS, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinCSAbbr},
+ 108: {tags: []string{"nso"}, localMonth: localMonthsNameSesothoSaLeboa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSesothoSaLeboa, weekdayNamesAbbr: weekdayNamesSesothoSaLeboaAbbr},
+ 1132: {tags: []string{"nso-ZA"}, localMonth: localMonthsNameSesothoSaLeboa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSesothoSaLeboa, weekdayNamesAbbr: weekdayNamesSesothoSaLeboaAbbr},
+ 50: {tags: []string{"tn"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
+ 2098: {tags: []string{"tn-BW"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
+ 1074: {tags: []string{"tn-ZA"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
+ 89: {tags: []string{"sd"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
+ 31833: {tags: []string{"sd-Arab"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
+ 2137: {tags: []string{"sd-Arab-PK"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
+ 91: {tags: []string{"si"}, localMonth: localMonthsNameSinhala, apFmt: apFmtSinhala, weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
+ 1115: {tags: []string{"si-LK"}, localMonth: localMonthsNameSinhala, apFmt: apFmtSinhala, weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
+ 27: {tags: []string{"sk"}, localMonth: localMonthsNameSlovak, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSlovak, weekdayNamesAbbr: weekdayNamesSlovakAbbr},
+ 1051: {tags: []string{"sk-SK"}, localMonth: localMonthsNameSlovak, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSlovak, weekdayNamesAbbr: weekdayNamesSlovakAbbr},
+ 36: {tags: []string{"sl"}, localMonth: localMonthsNameSlovenian, apFmt: apFmtSlovenian, weekdayNames: weekdayNamesSlovenian, weekdayNamesAbbr: weekdayNamesSlovenianAbbr},
+ 1060: {tags: []string{"sl-SI"}, localMonth: localMonthsNameSlovenian, apFmt: apFmtSlovenian, weekdayNames: weekdayNamesSlovenian, weekdayNamesAbbr: weekdayNamesSlovenianAbbr},
+ 119: {tags: []string{"so"}, localMonth: localMonthsNameSomali, apFmt: apFmtSomali, weekdayNames: weekdayNamesSomali, weekdayNamesAbbr: weekdayNamesSomaliAbbr},
+ 1143: {tags: []string{"so-SO"}, localMonth: localMonthsNameSomali, apFmt: apFmtSomali, weekdayNames: weekdayNamesSomali, weekdayNamesAbbr: weekdayNamesSomaliAbbr},
+ 48: {tags: []string{"st"}, localMonth: localMonthsNameSotho, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSotho, weekdayNamesAbbr: weekdayNamesSothoAbbr},
+ 1072: {tags: []string{"st-ZA"}, localMonth: localMonthsNameSotho, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSotho, weekdayNamesAbbr: weekdayNamesSothoAbbr},
+ 10: {tags: []string{"es"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanish, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
+ 11274: {tags: []string{"es-AR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 8202: {tags: []string{"es-VE"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 16394: {tags: []string{"es-BO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 13322: {tags: []string{"es-CL"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 9226: {tags: []string{"es-CO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 5130: {tags: []string{"es-CR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 23562: {tags: []string{"es-CU"}, localMonth: localMonthsNameSpanish, apFmt: apFmtCuba, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 7178: {tags: []string{"es-DO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 12298: {tags: []string{"es-EC"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 17418: {tags: []string{"es-SV"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 4106: {tags: []string{"es-GT"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 18442: {tags: []string{"es-HN"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 22538: {tags: []string{"es-419"}, localMonth: localMonthsNameSpanish, apFmt: apFmtCuba, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 2058: {tags: []string{"es-MX"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanish, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 19466: {tags: []string{"es-NI"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 6154: {tags: []string{"es-PA"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 15370: {tags: []string{"es-PY"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 10250: {tags: []string{"es-PE"}, localMonth: localMonthsNameSpanishPE, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 20490: {tags: []string{"es-PR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 1034: {tags: []string{"es-ES_tradnl"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
+ 3082: {tags: []string{"es-ES"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
+ 21514: {tags: []string{"es-US"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishUSAbbr},
+ 14346: {tags: []string{"es-UY"}, localMonth: localMonthsNameSpanishPE, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
+ 29: {tags: []string{"sv"}, localMonth: localMonthsNameSwedish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
+ 2077: {tags: []string{"sv-FI"}, localMonth: localMonthsNameSwedishFI, apFmt: apFmtSwedish, weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
+ 1053: {tags: []string{"sv-SE"}, localMonth: localMonthsNameSwedishFI, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
+ 90: {tags: []string{"syr"}, localMonth: localMonthsNameSyriac, apFmt: apFmtSyriac, weekdayNames: weekdayNamesSyriac, weekdayNamesAbbr: weekdayNamesSyriacAbbr},
+ 1114: {tags: []string{"syr-SY"}, localMonth: localMonthsNameSyriac, apFmt: apFmtSyriac, weekdayNames: weekdayNamesSyriac, weekdayNamesAbbr: weekdayNamesSyriacAbbr},
+ 40: {tags: []string{"tg"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
+ 31784: {tags: []string{"tg-Cyrl"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
+ 1064: {tags: []string{"tg-Cyrl-TJ"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
+ 95: {tags: []string{"tzm"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
+ 31839: {tags: []string{"tzm-Latn"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
+ 2143: {tags: []string{"tzm-Latn-DZ"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
+ 73: {tags: []string{"ta"}, localMonth: localMonthsNameTamil, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamil, weekdayNamesAbbr: weekdayNamesTamilAbbr},
+ 1097: {tags: []string{"ta-IN"}, localMonth: localMonthsNameTamil, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamil, weekdayNamesAbbr: weekdayNamesTamilAbbr},
+ 2121: {tags: []string{"ta-LK"}, localMonth: localMonthsNameTamilLK, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamilLK, weekdayNamesAbbr: weekdayNamesTamilLKAbbr},
+ 68: {tags: []string{"tt"}, localMonth: localMonthsNameTatar, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTatar, weekdayNamesAbbr: weekdayNamesTatarAbbr},
+ 1092: {tags: []string{"tt-RU"}, localMonth: localMonthsNameTatar, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTatar, weekdayNamesAbbr: weekdayNamesTatarAbbr},
+ 74: {tags: []string{"te"}, localMonth: localMonthsNameTelugu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTelugu, weekdayNamesAbbr: weekdayNamesTeluguAbbr},
+ 1098: {tags: []string{"te-IN"}, localMonth: localMonthsNameTelugu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTelugu, weekdayNamesAbbr: weekdayNamesTeluguAbbr},
+ 30: {tags: []string{"th"}, localMonth: localMonthsNameThai, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesThai, weekdayNamesAbbr: weekdayNamesThaiAbbr},
+ 1054: {tags: []string{"th-TH"}, localMonth: localMonthsNameThai, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesThai, weekdayNamesAbbr: weekdayNamesThaiAbbr},
+ 81: {tags: []string{"bo"}, localMonth: localMonthsNameTibetan, apFmt: apFmtTibetan, weekdayNames: weekdayNamesTibetan, weekdayNamesAbbr: weekdayNamesTibetanAbbr},
+ 1105: {tags: []string{"bo-CN"}, localMonth: localMonthsNameTibetan, apFmt: apFmtTibetan, weekdayNames: weekdayNamesTibetan, weekdayNamesAbbr: weekdayNamesTibetanAbbr},
+ 115: {tags: []string{"ti"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinya, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
+ 2163: {tags: []string{"ti-ER"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinyaER, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
+ 1139: {tags: []string{"ti-ET"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinya, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
+ 49: {tags: []string{"ts"}, localMonth: localMonthsNameTsonga, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTsonga, weekdayNamesAbbr: weekdayNamesTsongaAbbr},
+ 1073: {tags: []string{"ts-ZA"}, localMonth: localMonthsNameTsonga, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTsonga, weekdayNamesAbbr: weekdayNamesTsongaAbbr},
+ 31: {tags: []string{"tr"}, localMonth: localMonthsNameTurkish, apFmt: apFmtTurkish, weekdayNames: weekdayNamesTurkish, weekdayNamesAbbr: weekdayNamesTurkishAbbr},
+ 1055: {tags: []string{"tr-TR"}, localMonth: localMonthsNameTurkish, apFmt: apFmtTurkish, weekdayNames: weekdayNamesTurkish, weekdayNamesAbbr: weekdayNamesTurkishAbbr},
+ 66: {tags: []string{"tk"}, localMonth: localMonthsNameTurkmen, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTurkmen, weekdayNamesAbbr: weekdayNamesTurkmenAbbr},
+ 1090: {tags: []string{"tk-TM"}, localMonth: localMonthsNameTurkmen, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTurkmen, weekdayNamesAbbr: weekdayNamesTurkmenAbbr},
+ 34: {tags: []string{"uk"}, localMonth: localMonthsNameUkrainian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUkrainian, weekdayNamesAbbr: weekdayNamesUkrainianAbbr},
+ 1058: {tags: []string{"uk-UA"}, localMonth: localMonthsNameUkrainian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUkrainian, weekdayNamesAbbr: weekdayNamesUkrainianAbbr},
+ 46: {tags: []string{"hsb"}, localMonth: localMonthsNameUpperSorbian, apFmt: apFmtUpperSorbian, weekdayNames: weekdayNamesSorbian, weekdayNamesAbbr: weekdayNamesSorbianAbbr},
+ 1070: {tags: []string{"hsb-DE"}, localMonth: localMonthsNameUpperSorbian, apFmt: apFmtUpperSorbian, weekdayNames: weekdayNamesSorbian, weekdayNamesAbbr: weekdayNamesSorbianAbbr},
+ 32: {tags: []string{"ur"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUrdu, weekdayNamesAbbr: weekdayNamesUrdu},
+ 2080: {tags: []string{"ur-IN"}, localMonth: localMonthsNamePunjabiArab, apFmt: apFmtUrdu, weekdayNames: weekdayNamesUrduIN, weekdayNamesAbbr: weekdayNamesUrduIN},
+ 1056: {tags: []string{"ur-PK"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUrdu, weekdayNamesAbbr: weekdayNamesUrdu},
+ 128: {tags: []string{"ug"}, localMonth: localMonthsNameUyghur, apFmt: apFmtUyghur, weekdayNames: weekdayNamesUyghur, weekdayNamesAbbr: weekdayNamesUyghurAbbr},
+ 1152: {tags: []string{"ug-CN"}, localMonth: localMonthsNameUyghur, apFmt: apFmtUyghur, weekdayNames: weekdayNamesUyghur, weekdayNamesAbbr: weekdayNamesUyghurAbbr},
+ 30787: {tags: []string{"uz-Cyrl"}, localMonth: localMonthsNameUzbekCyrillic, apFmt: apFmtUzbekCyrillic, weekdayNames: weekdayNamesUzbekCyrillic, weekdayNamesAbbr: weekdayNamesUzbekCyrillicAbbr},
+ 2115: {tags: []string{"uz-Cyrl-UZ"}, localMonth: localMonthsNameUzbekCyrillic, apFmt: apFmtUzbekCyrillic, weekdayNames: weekdayNamesUzbekCyrillic, weekdayNamesAbbr: weekdayNamesUzbekCyrillicAbbr},
+ 67: {tags: []string{"uz"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
+ 31811: {tags: []string{"uz-Latn"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
+ 1091: {tags: []string{"uz-Latn-UZ"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
+ 2051: {tags: []string{"ca-ES-valencia"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
+ 51: {tags: []string{"ve"}, localMonth: localMonthsNameVenda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesVenda, weekdayNamesAbbr: weekdayNamesVendaAbbr},
+ 1075: {tags: []string{"ve-ZA"}, localMonth: localMonthsNameVenda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesVenda, weekdayNamesAbbr: weekdayNamesVendaAbbr},
+ 42: {tags: []string{"vi"}, localMonth: localMonthsNameVietnamese, apFmt: apFmtVietnamese, weekdayNames: weekdayNamesVietnamese, weekdayNamesAbbr: weekdayNamesVietnameseAbbr},
+ 1066: {tags: []string{"vi-VN"}, localMonth: localMonthsNameVietnamese, apFmt: apFmtVietnamese, weekdayNames: weekdayNamesVietnamese, weekdayNamesAbbr: weekdayNamesVietnameseAbbr},
+ 82: {tags: []string{"cy"}, localMonth: localMonthsNameWelsh, apFmt: apFmtWelsh, weekdayNames: weekdayNamesWelsh, weekdayNamesAbbr: weekdayNamesWelshAbbr},
+ 1106: {tags: []string{"cy-GB"}, localMonth: localMonthsNameWelsh, apFmt: apFmtWelsh, weekdayNames: weekdayNamesWelsh, weekdayNamesAbbr: weekdayNamesWelshAbbr},
+ 136: {tags: []string{"wo"}, localMonth: localMonthsNameWolof, apFmt: apFmtWolof, weekdayNames: weekdayNamesWolof, weekdayNamesAbbr: weekdayNamesWolofAbbr},
+ 1160: {tags: []string{"wo-SN"}, localMonth: localMonthsNameWolof, apFmt: apFmtWolof, weekdayNames: weekdayNamesWolof, weekdayNamesAbbr: weekdayNamesWolofAbbr},
+ 52: {tags: []string{"xh"}, localMonth: localMonthsNameXhosa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesXhosa, weekdayNamesAbbr: weekdayNamesXhosaAbbr},
+ 1076: {tags: []string{"xh-ZA"}, localMonth: localMonthsNameXhosa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesXhosa, weekdayNamesAbbr: weekdayNamesXhosaAbbr},
+ 120: {tags: []string{"ii"}, localMonth: localMonthsNameYi, apFmt: apFmtYi, weekdayNames: weekdayNamesYi, weekdayNamesAbbr: weekdayNamesYiAbbr},
+ 1144: {tags: []string{"ii-CN"}, localMonth: localMonthsNameYi, apFmt: apFmtYi, weekdayNames: weekdayNamesYi, weekdayNamesAbbr: weekdayNamesYiAbbr},
+ 1085: {tags: []string{"yi-001"}, localMonth: localMonthsNameYiddish, apFmt: apFmtYiddish, weekdayNames: weekdayNamesYiddish, weekdayNamesAbbr: weekdayNamesYiddishAbbr},
+ 106: {tags: []string{"yo"}, localMonth: localMonthsNameYoruba, apFmt: apFmtYoruba, weekdayNames: weekdayNamesYoruba, weekdayNamesAbbr: weekdayNamesYorubaAbbr},
+ 1130: {tags: []string{"yo-NG"}, localMonth: localMonthsNameYoruba, apFmt: apFmtYoruba, weekdayNames: weekdayNamesYoruba, weekdayNamesAbbr: weekdayNamesYorubaAbbr},
+ 53: {tags: []string{"zu"}, localMonth: localMonthsNameZulu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesZulu, weekdayNamesAbbr: weekdayNamesZuluAbbr},
+ 1077: {tags: []string{"zu-ZA"}, localMonth: localMonthsNameZulu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesZulu, weekdayNamesAbbr: weekdayNamesZuluAbbr},
+ }
+ // supportedLanguageCodeInfo directly maps the supported language code and tags.
+ supportedLanguageCodeInfo = map[string]languageInfo{
"JA-JP-X-GANNEN": {tags: []string{"ja-JP"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr},
"JA-JP-X-GANNEN,80": {tags: []string{"ja-JP"}, localMonth: localMonthsNameChinese3, apFmt: apFmtJapanese, weekdayNames: weekdayNamesJapanese, weekdayNamesAbbr: weekdayNamesJapaneseAbbr, useGannen: true},
- "4B": {tags: []string{"kn"}, localMonth: localMonthsNameKannada, apFmt: apFmtKannada, weekdayNames: weekdayNamesKannada, weekdayNamesAbbr: weekdayNamesKannadaAbbr},
- "44B": {tags: []string{"kn-IN"}, localMonth: localMonthsNameKannada, apFmt: apFmtKannada, weekdayNames: weekdayNamesKannada, weekdayNamesAbbr: weekdayNamesKannadaAbbr},
- "471": {tags: []string{"kr-Latn-NG"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "60": {tags: []string{"ks"}, localMonth: localMonthsNameKashmiri, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKashmiri, weekdayNamesAbbr: weekdayNamesKashmiriAbbr},
- "460": {tags: []string{"ks-Arab"}, localMonth: localMonthsNameKashmiri, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKashmiri, weekdayNamesAbbr: weekdayNamesKashmiriAbbr},
- "860": {tags: []string{"ks-Deva-IN"}, localMonth: localMonthsNameEnglish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesEnglish, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "3F": {tags: []string{"kk"}, localMonth: localMonthsNameKazakh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKazakh, weekdayNamesAbbr: weekdayNamesKazakhAbbr},
- "43F": {tags: []string{"kk-KZ"}, localMonth: localMonthsNameKazakh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKazakh, weekdayNamesAbbr: weekdayNamesKazakhAbbr},
- "53": {tags: []string{"km"}, localMonth: localMonthsNameKhmer, apFmt: apFmtKhmer, weekdayNames: weekdayNamesKhmer, weekdayNamesAbbr: weekdayNamesKhmerAbbr},
- "453": {tags: []string{"km-KH"}, localMonth: localMonthsNameKhmer, apFmt: apFmtKhmer, weekdayNames: weekdayNamesKhmer, weekdayNamesAbbr: weekdayNamesKhmerAbbr},
- "86": {tags: []string{"quc"}, localMonth: localMonthsNameKiche, apFmt: apFmtCuba, weekdayNames: weekdayNamesKiche, weekdayNamesAbbr: weekdayNamesKicheAbbr},
- "486": {tags: []string{"quc-Latn-GT"}, localMonth: localMonthsNameKiche, apFmt: apFmtCuba, weekdayNames: weekdayNamesKiche, weekdayNamesAbbr: weekdayNamesKicheAbbr},
- "87": {tags: []string{"rw"}, localMonth: localMonthsNameKinyarwanda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKinyarwanda, weekdayNamesAbbr: weekdayNamesKinyarwandaAbbr},
- "487": {tags: []string{"rw-RW"}, localMonth: localMonthsNameKinyarwanda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKinyarwanda, weekdayNamesAbbr: weekdayNamesKinyarwandaAbbr},
- "41": {tags: []string{"sw"}, localMonth: localMonthsNameKiswahili, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKiswahili, weekdayNamesAbbr: weekdayNamesKiswahiliAbbr},
- "441": {tags: []string{"sw-KE"}, localMonth: localMonthsNameKiswahili, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesKiswahili, weekdayNamesAbbr: weekdayNamesKiswahiliAbbr},
- "57": {tags: []string{"kok"}, localMonth: localMonthsNameKonkani, apFmt: apFmtKonkani, weekdayNames: weekdayNamesKonkani, weekdayNamesAbbr: weekdayNamesKonkaniAbbr},
- "457": {tags: []string{"kok-IN"}, localMonth: localMonthsNameKonkani, apFmt: apFmtKonkani, weekdayNames: weekdayNamesKonkani, weekdayNamesAbbr: weekdayNamesKonkaniAbbr},
- "12": {tags: []string{"ko"}, localMonth: localMonthsNameKorean, apFmt: apFmtKorean, weekdayNames: weekdayNamesKorean, weekdayNamesAbbr: weekdayNamesKoreanAbbr},
- "412": {tags: []string{"ko-KR"}, localMonth: localMonthsNameKorean, apFmt: apFmtKorean, weekdayNames: weekdayNamesKorean, weekdayNamesAbbr: weekdayNamesKoreanAbbr},
- "40": {tags: []string{"ky"}, localMonth: localMonthsNameKyrgyz, apFmt: apFmtKyrgyz, weekdayNames: weekdayNamesKyrgyz, weekdayNamesAbbr: weekdayNamesKyrgyzAbbr},
- "440": {tags: []string{"ky-KG"}, localMonth: localMonthsNameKyrgyz, apFmt: apFmtKyrgyz, weekdayNames: weekdayNamesKyrgyz, weekdayNamesAbbr: weekdayNamesKyrgyzAbbr},
- "54": {tags: []string{"lo"}, localMonth: localMonthsNameLao, apFmt: apFmtLao, weekdayNames: weekdayNamesLao, weekdayNamesAbbr: weekdayNamesLaoAbbr},
- "454": {tags: []string{"lo-LA"}, localMonth: localMonthsNameLao, apFmt: apFmtLao, weekdayNames: weekdayNamesLao, weekdayNamesAbbr: weekdayNamesLaoAbbr},
- "476": {tags: []string{"la-VA"}, localMonth: localMonthsNameLatin, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLatin, weekdayNamesAbbr: weekdayNamesLatinAbbr},
- "26": {tags: []string{"lv"}, localMonth: localMonthsNameLatvian, apFmt: apFmtLatvian, weekdayNames: weekdayNamesLatvian, weekdayNamesAbbr: weekdayNamesLatvianAbbr},
- "426": {tags: []string{"lv-LV"}, localMonth: localMonthsNameLatvian, apFmt: apFmtLatvian, weekdayNames: weekdayNamesLatvian, weekdayNamesAbbr: weekdayNamesLatvianAbbr},
- "27": {tags: []string{"lt"}, localMonth: localMonthsNameLithuanian, apFmt: apFmtLithuanian, weekdayNames: weekdayNamesLithuanian, weekdayNamesAbbr: weekdayNamesLithuanianAbbr},
- "427": {tags: []string{"lt-LT"}, localMonth: localMonthsNameLithuanian, apFmt: apFmtLithuanian, weekdayNames: weekdayNamesLithuanian, weekdayNamesAbbr: weekdayNamesLithuanianAbbr},
- "7C2E": {tags: []string{"dsb"}, localMonth: localMonthsNameLowerSorbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLowerSorbian, weekdayNamesAbbr: weekdayNamesLowerSorbianAbbr},
- "82E": {tags: []string{"dsb-DE"}, localMonth: localMonthsNameLowerSorbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLowerSorbian, weekdayNamesAbbr: weekdayNamesLowerSorbianAbbr},
- "6E": {tags: []string{"lb"}, localMonth: localMonthsNameLuxembourgish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLuxembourgish, weekdayNamesAbbr: weekdayNamesLuxembourgishAbbr},
- "46E": {tags: []string{"lb-LU"}, localMonth: localMonthsNameLuxembourgish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesLuxembourgish, weekdayNamesAbbr: weekdayNamesLuxembourgishAbbr},
- "2F": {tags: []string{"mk"}, localMonth: localMonthsNameMacedonian, apFmt: apFmtMacedonian, weekdayNames: weekdayNamesMacedonian, weekdayNamesAbbr: weekdayNamesMacedonianAbbr},
- "42F": {tags: []string{"mk-MK"}, localMonth: localMonthsNameMacedonian, apFmt: apFmtMacedonian, weekdayNames: weekdayNamesMacedonian, weekdayNamesAbbr: weekdayNamesMacedonianAbbr},
- "3E": {tags: []string{"ms"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
- "83E": {tags: []string{"ms-BN"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
- "43E": {tags: []string{"ms-MY"}, localMonth: localMonthsNameMalay, apFmt: apFmtMalay, weekdayNames: weekdayNamesMalay, weekdayNamesAbbr: weekdayNamesMalayAbbr},
- "4C": {tags: []string{"ml"}, localMonth: localMonthsNameMalayalam, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMalayalam, weekdayNamesAbbr: weekdayNamesMalayalamAbbr},
- "44C": {tags: []string{"ml-IN"}, localMonth: localMonthsNameMalayalam, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMalayalam, weekdayNamesAbbr: weekdayNamesMalayalamAbbr},
- "3A": {tags: []string{"mt"}, localMonth: localMonthsNameMaltese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMaltese, weekdayNamesAbbr: weekdayNamesMalteseAbbr},
- "43A": {tags: []string{"mt-MT"}, localMonth: localMonthsNameMaltese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMaltese, weekdayNamesAbbr: weekdayNamesMalteseAbbr},
- "81": {tags: []string{"mi"}, localMonth: localMonthsNameMaori, apFmt: apFmtCuba, weekdayNames: weekdayNamesMaori, weekdayNamesAbbr: weekdayNamesMaoriAbbr},
- "481": {tags: []string{"mi-NZ"}, localMonth: localMonthsNameMaori, apFmt: apFmtCuba, weekdayNames: weekdayNamesMaori, weekdayNamesAbbr: weekdayNamesMaoriAbbr},
- "7A": {tags: []string{"arn"}, localMonth: localMonthsNameMapudungun, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMapudungun, weekdayNamesAbbr: weekdayNamesMapudungunAbbr},
- "47A": {tags: []string{"arn-CL"}, localMonth: localMonthsNameMapudungun, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMapudungun, weekdayNamesAbbr: weekdayNamesMapudungunAbbr},
- "4E": {tags: []string{"mr"}, localMonth: localMonthsNameMarathi, apFmt: apFmtKonkani, weekdayNames: weekdayNamesMarathi, weekdayNamesAbbr: weekdayNamesMarathiAbbr},
- "44E": {tags: []string{"mr-IN"}, localMonth: localMonthsNameMarathi, apFmt: apFmtKonkani, weekdayNames: weekdayNamesMarathi, weekdayNamesAbbr: weekdayNamesMarathiAbbr},
- "7C": {tags: []string{"moh"}, localMonth: localMonthsNameMohawk, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMohawk, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "47C": {tags: []string{"moh-CA"}, localMonth: localMonthsNameMohawk, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesMohawk, weekdayNamesAbbr: weekdayNamesEnglishAbbr},
- "50": {tags: []string{"mn"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianAbbr},
- "7850": {tags: []string{"mn-Cyrl"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianCyrlAbbr},
- "450": {tags: []string{"mn-MN"}, localMonth: localMonthsNameMongolian, apFmt: apFmtMongolian, weekdayNames: weekdayNamesMongolian, weekdayNamesAbbr: weekdayNamesMongolianCyrlAbbr},
- "7C50": {tags: []string{"mn-Mong"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolian, weekdayNamesAbbr: weekdayNamesTraditionalMongolian},
- "850": {tags: []string{"mn-Mong-CN"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolian, weekdayNamesAbbr: weekdayNamesTraditionalMongolian},
- "C50": {tags: []string{"mn-Mong-MN"}, localMonth: localMonthsNameTraditionalMongolian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTraditionalMongolianMN, weekdayNamesAbbr: weekdayNamesTraditionalMongolianMN},
- "61": {tags: []string{"ne"}, localMonth: localMonthsNameNepali, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepali, weekdayNamesAbbr: weekdayNamesNepaliAbbr},
- "861": {tags: []string{"ne-IN"}, localMonth: localMonthsNameNepaliIN, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepaliIN, weekdayNamesAbbr: weekdayNamesNepaliINAbbr},
- "461": {tags: []string{"ne-NP"}, localMonth: localMonthsNameNepali, apFmt: apFmtHindi, weekdayNames: weekdayNamesNepali, weekdayNamesAbbr: weekdayNamesNepaliAbbr},
- "14": {tags: []string{"no"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianAbbr},
- "7C14": {tags: []string{"nb"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianNOAbbr},
- "414": {tags: []string{"nb-NO"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtCuba, weekdayNames: weekdayNamesNorwegian, weekdayNamesAbbr: weekdayNamesNorwegianNOAbbr},
- "7814": {tags: []string{"nn"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtNorwegian, weekdayNames: weekdayNamesNorwegianNynorsk, weekdayNamesAbbr: weekdayNamesNorwegianNynorskAbbr},
- "814": {tags: []string{"nn-NO"}, localMonth: localMonthsNameNorwegian, apFmt: apFmtNorwegian, weekdayNames: weekdayNamesNorwegianNynorsk, weekdayNamesAbbr: weekdayNamesNorwegianNynorskAbbr},
- "82": {tags: []string{"oc"}, localMonth: localMonthsNameOccitan, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOccitan, weekdayNamesAbbr: weekdayNamesOccitanAbbr},
- "482": {tags: []string{"oc-FR"}, localMonth: localMonthsNameOccitan, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOccitan, weekdayNamesAbbr: weekdayNamesOccitanAbbr},
- "48": {tags: []string{"or"}, localMonth: localMonthsNameOdia, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOdia, weekdayNamesAbbr: weekdayNamesOdiaAbbr},
- "448": {tags: []string{"or-IN"}, localMonth: localMonthsNameOdia, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesOdia, weekdayNamesAbbr: weekdayNamesOdiaAbbr},
- "72": {tags: []string{"om"}, localMonth: localMonthsNameOromo, apFmt: apFmtOromo, weekdayNames: weekdayNamesOromo, weekdayNamesAbbr: weekdayNamesOromoAbbr},
- "472": {tags: []string{"om-ET"}, localMonth: localMonthsNameOromo, apFmt: apFmtOromo, weekdayNames: weekdayNamesOromo, weekdayNamesAbbr: weekdayNamesOromoAbbr},
- "63": {tags: []string{"ps"}, localMonth: localMonthsNamePashto, apFmt: apFmtPashto, weekdayNames: weekdayNamesPashto, weekdayNamesAbbr: weekdayNamesPashto},
- "463": {tags: []string{"ps-AF"}, localMonth: localMonthsNamePashto, apFmt: apFmtPashto, weekdayNames: weekdayNamesPashto, weekdayNamesAbbr: weekdayNamesPashto},
- "29": {tags: []string{"fa"}, localMonth: localMonthsNamePersian, apFmt: apFmtPersian, weekdayNames: weekdayNamesPersian, weekdayNamesAbbr: weekdayNamesPersian},
- "429": {tags: []string{"fa-IR"}, localMonth: localMonthsNamePersian, apFmt: apFmtPersian, weekdayNames: weekdayNamesPersian, weekdayNamesAbbr: weekdayNamesPersian},
- "15": {tags: []string{"pl"}, localMonth: localMonthsNamePolish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPolish, weekdayNamesAbbr: weekdayNamesPolishAbbr},
- "415": {tags: []string{"pl-PL"}, localMonth: localMonthsNamePolish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPolish, weekdayNamesAbbr: weekdayNamesPolishAbbr},
- "16": {tags: []string{"pt"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
- "416": {tags: []string{"pt-BR"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
- "816": {tags: []string{"pt-PT"}, localMonth: localMonthsNamePortuguese, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPortuguese, weekdayNamesAbbr: weekdayNamesPortugueseAbbr},
- "46": {tags: []string{"pa"}, localMonth: localMonthsNamePunjabi, apFmt: apFmtPunjabi, weekdayNames: weekdayNamesPunjabi, weekdayNamesAbbr: weekdayNamesPunjabiAbbr},
- "7C46": {tags: []string{"pa-Arab"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPunjabiArab, weekdayNamesAbbr: weekdayNamesPunjabiArab},
- "446": {tags: []string{"pa-IN"}, localMonth: localMonthsNamePunjabi, apFmt: apFmtPunjabi, weekdayNames: weekdayNamesPunjabi, weekdayNamesAbbr: weekdayNamesPunjabiAbbr},
- "846": {tags: []string{"pa-Arab-PK"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesPunjabiArab, weekdayNamesAbbr: weekdayNamesPunjabiArab},
- "6B": {tags: []string{"quz"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechua, weekdayNamesAbbr: weekdayNamesQuechuaAbbr},
- "46B": {tags: []string{"quz-BO"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechua, weekdayNamesAbbr: weekdayNamesQuechuaAbbr},
- "86B": {tags: []string{"quz-EC"}, localMonth: localMonthsNameQuechuaEcuador, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesQuechuaEcuador, weekdayNamesAbbr: weekdayNamesQuechuaEcuadorAbbr},
- "C6B": {tags: []string{"quz-PE"}, localMonth: localMonthsNameQuechua, apFmt: apFmtCuba, weekdayNames: weekdayNamesQuechuaPeru, weekdayNamesAbbr: weekdayNamesQuechuaPeruAbbr},
- "18": {tags: []string{"ro"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianAbbr},
- "818": {tags: []string{"ro-MD"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianMoldovaAbbr},
- "418": {tags: []string{"ro-RO"}, localMonth: localMonthsNameRomanian, apFmt: apFmtCuba, weekdayNames: weekdayNamesRomanian, weekdayNamesAbbr: weekdayNamesRomanianAbbr},
- "17": {tags: []string{"rm"}, localMonth: localMonthsNameRomansh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRomansh, weekdayNamesAbbr: weekdayNamesRomanshAbbr},
- "417": {tags: []string{"rm-CH"}, localMonth: localMonthsNameRomansh, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRomansh, weekdayNamesAbbr: weekdayNamesRomanshAbbr},
- "19": {tags: []string{"ru"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
- "819": {tags: []string{"ru-MD"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
- "419": {tags: []string{"ru-RU"}, localMonth: localMonthsNameRussian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesRussian, weekdayNamesAbbr: weekdayNamesRussianAbbr},
- "85": {tags: []string{"sah"}, localMonth: localMonthsNameSakha, apFmt: apFmtSakha, weekdayNames: weekdayNamesSakha, weekdayNamesAbbr: weekdayNamesSakhaAbbr},
- "485": {tags: []string{"sah-RU"}, localMonth: localMonthsNameSakha, apFmt: apFmtSakha, weekdayNames: weekdayNamesSakha, weekdayNamesAbbr: weekdayNamesSakhaAbbr},
- "703B": {tags: []string{"smn"}, localMonth: localMonthsNameSami, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSami, weekdayNamesAbbr: weekdayNamesSamiAbbr},
- "243B": {tags: []string{"smn-FI"}, localMonth: localMonthsNameSami, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSami, weekdayNamesAbbr: weekdayNamesSamiAbbr},
- "7C3B": {tags: []string{"smj"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSamiLule, weekdayNamesAbbr: weekdayNamesSamiSwedenAbbr},
- "103B": {tags: []string{"smj-NO"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSamiLule, weekdayNamesAbbr: weekdayNamesSamiSamiLuleAbbr},
- "143B": {tags: []string{"smj-SE"}, localMonth: localMonthsNameSamiLule, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSweden, weekdayNamesAbbr: weekdayNamesSamiSwedenAbbr},
- "3B": {tags: []string{"se"}, localMonth: localMonthsNameSamiNorthern, apFmt: apFmtSamiNorthern, weekdayNames: weekdayNamesSamiNorthern, weekdayNamesAbbr: weekdayNamesSamiNorthernAbbr},
- "C3B": {tags: []string{"se-FI"}, localMonth: localMonthsNameSamiNorthernFI, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiNorthernFI, weekdayNamesAbbr: weekdayNamesSamiNorthernFIAbbr},
- "43B": {tags: []string{"se-NO"}, localMonth: localMonthsNameSamiNorthern, apFmt: apFmtSamiNorthern, weekdayNames: weekdayNamesSamiNorthern, weekdayNamesAbbr: weekdayNamesSamiNorthernAbbr},
- "83B": {tags: []string{"se-SE"}, localMonth: localMonthsNameSamiNorthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiNorthernSE, weekdayNamesAbbr: weekdayNamesSamiNorthernSEAbbr},
- "743B": {tags: []string{"sms"}, localMonth: localMonthsNameSamiSkolt, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSkolt, weekdayNamesAbbr: weekdayNamesSamiSkoltAbbr},
- "203B": {tags: []string{"sms-FI"}, localMonth: localMonthsNameSamiSkolt, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSkolt, weekdayNamesAbbr: weekdayNamesSamiSkoltAbbr},
- "783B": {tags: []string{"sma"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
- "183B": {tags: []string{"sma-NO"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
- "1C3B": {tags: []string{"sma-SE"}, localMonth: localMonthsNameSamiSouthern, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSamiSouthern, weekdayNamesAbbr: weekdayNamesSamiSouthernAbbr},
- "4F": {tags: []string{"sa"}, localMonth: localMonthsNameSanskrit, apFmt: apFmtSanskrit, weekdayNames: weekdayNamesSanskrit, weekdayNamesAbbr: weekdayNamesSanskritAbbr},
- "44F": {tags: []string{"sa-IN"}, localMonth: localMonthsNameSanskrit, apFmt: apFmtSanskrit, weekdayNames: weekdayNamesSanskrit, weekdayNamesAbbr: weekdayNamesSanskritAbbr},
- "91": {tags: []string{"gd"}, localMonth: localMonthsNameScottishGaelic, apFmt: apFmtScottishGaelic, weekdayNames: weekdayNamesGaelic, weekdayNamesAbbr: weekdayNamesGaelicAbbr},
- "491": {tags: []string{"gd-GB"}, localMonth: localMonthsNameScottishGaelic, apFmt: apFmtScottishGaelic, weekdayNames: weekdayNamesGaelic, weekdayNamesAbbr: weekdayNamesGaelicAbbr},
- "6C1A": {tags: []string{"sr-Cyrl"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
- "1C1A": {tags: []string{"sr-Cyrl-BA"}, localMonth: localMonthsNameSerbianBA, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianBA, weekdayNamesAbbr: weekdayNamesSerbianBAAbbr},
- "301A": {tags: []string{"sr-Cyrl-ME"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianME, weekdayNamesAbbr: weekdayNamesSerbianBAAbbr},
- "281A": {tags: []string{"sr-Cyrl-RS"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
- "C1A": {tags: []string{"sr-Cyrl-CS"}, localMonth: localMonthsNameSerbian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbian, weekdayNamesAbbr: weekdayNamesSerbianAbbr},
- "701A": {tags: []string{"sr-Latn"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
- "7C1A": {tags: []string{"sr"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
- "181A": {tags: []string{"sr-Latn-BA"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatinBA, weekdayNames: weekdayNamesSerbianLatinBA, weekdayNamesAbbr: weekdayNamesSerbianLatinBAAbbr},
- "2C1A": {tags: []string{"sr-Latn-ME"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatinBA, weekdayNames: weekdayNamesSerbianLatinME, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
- "241A": {tags: []string{"sr-Latn-RS"}, localMonth: localMonthsNameSerbianLatin, apFmt: apFmtSerbianLatin, weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinAbbr},
- "81A": {tags: []string{"sr-Latn-CS"}, localMonth: localMonthsNameSerbianLatinCS, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSerbianLatin, weekdayNamesAbbr: weekdayNamesSerbianLatinCSAbbr},
- "6C": {tags: []string{"nso"}, localMonth: localMonthsNameSesothoSaLeboa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSesothoSaLeboa, weekdayNamesAbbr: weekdayNamesSesothoSaLeboaAbbr},
- "46C": {tags: []string{"nso-ZA"}, localMonth: localMonthsNameSesothoSaLeboa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSesothoSaLeboa, weekdayNamesAbbr: weekdayNamesSesothoSaLeboaAbbr},
- "32": {tags: []string{"tn"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
- "832": {tags: []string{"tn-BW"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
- "432": {tags: []string{"tn-ZA"}, localMonth: localMonthsNameSetswana, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSetswana, weekdayNamesAbbr: weekdayNamesSetswanaAbbr},
- "59": {tags: []string{"sd"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
- "7C59": {tags: []string{"sd-Arab"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
- "859": {tags: []string{"sd-Arab-PK"}, localMonth: localMonthsNameSindhi, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
- "5B": {tags: []string{"si"}, localMonth: localMonthsNameSinhala, apFmt: apFmtSinhala, weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
- "45B": {tags: []string{"si-LK"}, localMonth: localMonthsNameSinhala, apFmt: apFmtSinhala, weekdayNames: weekdayNamesSindhi, weekdayNamesAbbr: weekdayNamesSindhiAbbr},
- "1B": {tags: []string{"sk"}, localMonth: localMonthsNameSlovak, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSlovak, weekdayNamesAbbr: weekdayNamesSlovakAbbr},
- "41B": {tags: []string{"sk-SK"}, localMonth: localMonthsNameSlovak, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSlovak, weekdayNamesAbbr: weekdayNamesSlovakAbbr},
- "24": {tags: []string{"sl"}, localMonth: localMonthsNameSlovenian, apFmt: apFmtSlovenian, weekdayNames: weekdayNamesSlovenian, weekdayNamesAbbr: weekdayNamesSlovenianAbbr},
- "424": {tags: []string{"sl-SI"}, localMonth: localMonthsNameSlovenian, apFmt: apFmtSlovenian, weekdayNames: weekdayNamesSlovenian, weekdayNamesAbbr: weekdayNamesSlovenianAbbr},
- "77": {tags: []string{"so"}, localMonth: localMonthsNameSomali, apFmt: apFmtSomali, weekdayNames: weekdayNamesSomali, weekdayNamesAbbr: weekdayNamesSomaliAbbr},
- "477": {tags: []string{"so-SO"}, localMonth: localMonthsNameSomali, apFmt: apFmtSomali, weekdayNames: weekdayNamesSomali, weekdayNamesAbbr: weekdayNamesSomaliAbbr},
- "30": {tags: []string{"st"}, localMonth: localMonthsNameSotho, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSotho, weekdayNamesAbbr: weekdayNamesSothoAbbr},
- "430": {tags: []string{"st-ZA"}, localMonth: localMonthsNameSotho, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSotho, weekdayNamesAbbr: weekdayNamesSothoAbbr},
- "A": {tags: []string{"es"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanish, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
- "2C0A": {tags: []string{"es-AR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "200A": {tags: []string{"es-VE"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "400A": {tags: []string{"es-BO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "340A": {tags: []string{"es-CL"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "240A": {tags: []string{"es-CO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "140A": {tags: []string{"es-CR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "5C0A": {tags: []string{"es-CU"}, localMonth: localMonthsNameSpanish, apFmt: apFmtCuba, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "1C0A": {tags: []string{"es-DO"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "300A": {tags: []string{"es-EC"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "440A": {tags: []string{"es-SV"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "100A": {tags: []string{"es-GT"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "480A": {tags: []string{"es-HN"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "580A": {tags: []string{"es-419"}, localMonth: localMonthsNameSpanish, apFmt: apFmtCuba, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "80A": {tags: []string{"es-MX"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanish, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "4C0A": {tags: []string{"es-NI"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "180A": {tags: []string{"es-PA"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "3C0A": {tags: []string{"es-PY"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "280A": {tags: []string{"es-PE"}, localMonth: localMonthsNameSpanishPE, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "500A": {tags: []string{"es-PR"}, localMonth: localMonthsNameSpanish, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "40A": {tags: []string{"es-ES_tradnl"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
- "C0A": {tags: []string{"es-ES"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishAbbr},
- "540A": {tags: []string{"es-US"}, localMonth: localMonthsNameSpanish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishUSAbbr},
- "380A": {tags: []string{"es-UY"}, localMonth: localMonthsNameSpanishPE, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesSpanish, weekdayNamesAbbr: weekdayNamesSpanishARAbbr},
- "1D": {tags: []string{"sv"}, localMonth: localMonthsNameSwedish, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
- "81D": {tags: []string{"sv-FI"}, localMonth: localMonthsNameSwedishFI, apFmt: apFmtSwedish, weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
- "41D": {tags: []string{"sv-SE"}, localMonth: localMonthsNameSwedishFI, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesSwedish, weekdayNamesAbbr: weekdayNamesSwedishAbbr},
- "5A": {tags: []string{"syr"}, localMonth: localMonthsNameSyriac, apFmt: apFmtSyriac, weekdayNames: weekdayNamesSyriac, weekdayNamesAbbr: weekdayNamesSyriacAbbr},
- "45A": {tags: []string{"syr-SY"}, localMonth: localMonthsNameSyriac, apFmt: apFmtSyriac, weekdayNames: weekdayNamesSyriac, weekdayNamesAbbr: weekdayNamesSyriacAbbr},
- "28": {tags: []string{"tg"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
- "7C28": {tags: []string{"tg-Cyrl"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
- "428": {tags: []string{"tg-Cyrl-TJ"}, localMonth: localMonthsNameTajik, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTajik, weekdayNamesAbbr: weekdayNamesTajikAbbr},
- "5F": {tags: []string{"tzm"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
- "7C5F": {tags: []string{"tzm-Latn"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
- "85F": {tags: []string{"tzm-Latn-DZ"}, localMonth: localMonthsNameTamazight, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTamazight, weekdayNamesAbbr: weekdayNamesTamazightAbbr},
- "49": {tags: []string{"ta"}, localMonth: localMonthsNameTamil, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamil, weekdayNamesAbbr: weekdayNamesTamilAbbr},
- "449": {tags: []string{"ta-IN"}, localMonth: localMonthsNameTamil, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamil, weekdayNamesAbbr: weekdayNamesTamilAbbr},
- "849": {tags: []string{"ta-LK"}, localMonth: localMonthsNameTamilLK, apFmt: apFmtTamil, weekdayNames: weekdayNamesTamilLK, weekdayNamesAbbr: weekdayNamesTamilLKAbbr},
- "44": {tags: []string{"tt"}, localMonth: localMonthsNameTatar, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTatar, weekdayNamesAbbr: weekdayNamesTatarAbbr},
- "444": {tags: []string{"tt-RU"}, localMonth: localMonthsNameTatar, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTatar, weekdayNamesAbbr: weekdayNamesTatarAbbr},
- "4A": {tags: []string{"te"}, localMonth: localMonthsNameTelugu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTelugu, weekdayNamesAbbr: weekdayNamesTeluguAbbr},
- "44A": {tags: []string{"te-IN"}, localMonth: localMonthsNameTelugu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTelugu, weekdayNamesAbbr: weekdayNamesTeluguAbbr},
- "1E": {tags: []string{"th"}, localMonth: localMonthsNameThai, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesThai, weekdayNamesAbbr: weekdayNamesThaiAbbr},
- "41E": {tags: []string{"th-TH"}, localMonth: localMonthsNameThai, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesThai, weekdayNamesAbbr: weekdayNamesThaiAbbr},
- "51": {tags: []string{"bo"}, localMonth: localMonthsNameTibetan, apFmt: apFmtTibetan, weekdayNames: weekdayNamesTibetan, weekdayNamesAbbr: weekdayNamesTibetanAbbr},
- "451": {tags: []string{"bo-CN"}, localMonth: localMonthsNameTibetan, apFmt: apFmtTibetan, weekdayNames: weekdayNamesTibetan, weekdayNamesAbbr: weekdayNamesTibetanAbbr},
- "73": {tags: []string{"ti"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinya, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
- "873": {tags: []string{"ti-ER"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinyaER, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
- "473": {tags: []string{"ti-ET"}, localMonth: localMonthsNameTigrinya, apFmt: apFmtTigrinya, weekdayNames: weekdayNamesTigrinya, weekdayNamesAbbr: weekdayNamesTigrinyaAbbr},
- "31": {tags: []string{"ts"}, localMonth: localMonthsNameTsonga, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTsonga, weekdayNamesAbbr: weekdayNamesTsongaAbbr},
- "431": {tags: []string{"ts-ZA"}, localMonth: localMonthsNameTsonga, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTsonga, weekdayNamesAbbr: weekdayNamesTsongaAbbr},
- "1F": {tags: []string{"tr"}, localMonth: localMonthsNameTurkish, apFmt: apFmtTurkish, weekdayNames: weekdayNamesTurkish, weekdayNamesAbbr: weekdayNamesTurkishAbbr},
- "41F": {tags: []string{"tr-TR"}, localMonth: localMonthsNameTurkish, apFmt: apFmtTurkish, weekdayNames: weekdayNamesTurkish, weekdayNamesAbbr: weekdayNamesTurkishAbbr},
- "42": {tags: []string{"tk"}, localMonth: localMonthsNameTurkmen, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTurkmen, weekdayNamesAbbr: weekdayNamesTurkmenAbbr},
- "442": {tags: []string{"tk-TM"}, localMonth: localMonthsNameTurkmen, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesTurkmen, weekdayNamesAbbr: weekdayNamesTurkmenAbbr},
- "22": {tags: []string{"uk"}, localMonth: localMonthsNameUkrainian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUkrainian, weekdayNamesAbbr: weekdayNamesUkrainianAbbr},
- "422": {tags: []string{"uk-UA"}, localMonth: localMonthsNameUkrainian, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUkrainian, weekdayNamesAbbr: weekdayNamesUkrainianAbbr},
- "2E": {tags: []string{"hsb"}, localMonth: localMonthsNameUpperSorbian, apFmt: apFmtUpperSorbian, weekdayNames: weekdayNamesSorbian, weekdayNamesAbbr: weekdayNamesSorbianAbbr},
- "42E": {tags: []string{"hsb-DE"}, localMonth: localMonthsNameUpperSorbian, apFmt: apFmtUpperSorbian, weekdayNames: weekdayNamesSorbian, weekdayNamesAbbr: weekdayNamesSorbianAbbr},
- "20": {tags: []string{"ur"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUrdu, weekdayNamesAbbr: weekdayNamesUrdu},
- "820": {tags: []string{"ur-IN"}, localMonth: localMonthsNamePunjabiArab, apFmt: apFmtUrdu, weekdayNames: weekdayNamesUrduIN, weekdayNamesAbbr: weekdayNamesUrduIN},
- "420": {tags: []string{"ur-PK"}, localMonth: localMonthsNamePunjabiArab, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesUrdu, weekdayNamesAbbr: weekdayNamesUrdu},
- "80": {tags: []string{"ug"}, localMonth: localMonthsNameUyghur, apFmt: apFmtUyghur, weekdayNames: weekdayNamesUyghur, weekdayNamesAbbr: weekdayNamesUyghurAbbr},
- "480": {tags: []string{"ug-CN"}, localMonth: localMonthsNameUyghur, apFmt: apFmtUyghur, weekdayNames: weekdayNamesUyghur, weekdayNamesAbbr: weekdayNamesUyghurAbbr},
- "7843": {tags: []string{"uz-Cyrl"}, localMonth: localMonthsNameUzbekCyrillic, apFmt: apFmtUzbekCyrillic, weekdayNames: weekdayNamesUzbekCyrillic, weekdayNamesAbbr: weekdayNamesUzbekCyrillicAbbr},
- "843": {tags: []string{"uz-Cyrl-UZ"}, localMonth: localMonthsNameUzbekCyrillic, apFmt: apFmtUzbekCyrillic, weekdayNames: weekdayNamesUzbekCyrillic, weekdayNamesAbbr: weekdayNamesUzbekCyrillicAbbr},
- "43": {tags: []string{"uz"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
- "7C43": {tags: []string{"uz-Latn"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
- "443": {tags: []string{"uz-Latn-UZ"}, localMonth: localMonthsNameUzbek, apFmt: apFmtUzbek, weekdayNames: weekdayNamesUzbek, weekdayNamesAbbr: weekdayNamesUzbekAbbr},
- "803": {tags: []string{"ca-ES-valencia"}, localMonth: localMonthsNameValencian, apFmt: apFmtSpanishAR, weekdayNames: weekdayNamesValencian, weekdayNamesAbbr: weekdayNamesValencianAbbr},
- "33": {tags: []string{"ve"}, localMonth: localMonthsNameVenda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesVenda, weekdayNamesAbbr: weekdayNamesVendaAbbr},
- "433": {tags: []string{"ve-ZA"}, localMonth: localMonthsNameVenda, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesVenda, weekdayNamesAbbr: weekdayNamesVendaAbbr},
- "2A": {tags: []string{"vi"}, localMonth: localMonthsNameVietnamese, apFmt: apFmtVietnamese, weekdayNames: weekdayNamesVietnamese, weekdayNamesAbbr: weekdayNamesVietnameseAbbr},
- "42A": {tags: []string{"vi-VN"}, localMonth: localMonthsNameVietnamese, apFmt: apFmtVietnamese, weekdayNames: weekdayNamesVietnamese, weekdayNamesAbbr: weekdayNamesVietnameseAbbr},
- "52": {tags: []string{"cy"}, localMonth: localMonthsNameWelsh, apFmt: apFmtWelsh, weekdayNames: weekdayNamesWelsh, weekdayNamesAbbr: weekdayNamesWelshAbbr},
- "452": {tags: []string{"cy-GB"}, localMonth: localMonthsNameWelsh, apFmt: apFmtWelsh, weekdayNames: weekdayNamesWelsh, weekdayNamesAbbr: weekdayNamesWelshAbbr},
- "88": {tags: []string{"wo"}, localMonth: localMonthsNameWolof, apFmt: apFmtWolof, weekdayNames: weekdayNamesWolof, weekdayNamesAbbr: weekdayNamesWolofAbbr},
- "488": {tags: []string{"wo-SN"}, localMonth: localMonthsNameWolof, apFmt: apFmtWolof, weekdayNames: weekdayNamesWolof, weekdayNamesAbbr: weekdayNamesWolofAbbr},
- "34": {tags: []string{"xh"}, localMonth: localMonthsNameXhosa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesXhosa, weekdayNamesAbbr: weekdayNamesXhosaAbbr},
- "434": {tags: []string{"xh-ZA"}, localMonth: localMonthsNameXhosa, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesXhosa, weekdayNamesAbbr: weekdayNamesXhosaAbbr},
- "78": {tags: []string{"ii"}, localMonth: localMonthsNameYi, apFmt: apFmtYi, weekdayNames: weekdayNamesYi, weekdayNamesAbbr: weekdayNamesYiAbbr},
- "478": {tags: []string{"ii-CN"}, localMonth: localMonthsNameYi, apFmt: apFmtYi, weekdayNames: weekdayNamesYi, weekdayNamesAbbr: weekdayNamesYiAbbr},
- "43D": {tags: []string{"yi-001"}, localMonth: localMonthsNameYiddish, apFmt: apFmtYiddish, weekdayNames: weekdayNamesYiddish, weekdayNamesAbbr: weekdayNamesYiddishAbbr},
- "6A": {tags: []string{"yo"}, localMonth: localMonthsNameYoruba, apFmt: apFmtYoruba, weekdayNames: weekdayNamesYoruba, weekdayNamesAbbr: weekdayNamesYorubaAbbr},
- "46A": {tags: []string{"yo-NG"}, localMonth: localMonthsNameYoruba, apFmt: apFmtYoruba, weekdayNames: weekdayNamesYoruba, weekdayNamesAbbr: weekdayNamesYorubaAbbr},
- "35": {tags: []string{"zu"}, localMonth: localMonthsNameZulu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesZulu, weekdayNamesAbbr: weekdayNamesZuluAbbr},
- "435": {tags: []string{"zu-ZA"}, localMonth: localMonthsNameZulu, apFmt: nfp.AmPm[0], weekdayNames: weekdayNamesZulu, weekdayNamesAbbr: weekdayNamesZuluAbbr},
}
// japaneseEraYears list the Japanese era name periods.
japaneseEraYears = []time.Time{
@@ -4632,6 +4636,31 @@ var (
}
)
+// getSupportedLanguageInfo returns language infomation by giving language code.
+// This function does not support different calendar type of the language
+// currently. For example: the hexadecimal language code 3010429 (fa-IR,301)
+// will be convert to 0429 (fa-IR).
+func getSupportedLanguageInfo(lang string) (languageInfo, bool) {
+ hex := lang
+ if len(hex) > 4 {
+ hex = hex[len(hex)-4:]
+ }
+ n := new(big.Int)
+ n.SetString(hex, 16)
+ if info, ok := supportedLanguageInfo[int(n.Int64())]; ok {
+ return info, ok
+ }
+ if info, ok := supportedLanguageCodeInfo[lang]; ok {
+ return info, ok
+ }
+ for _, info := range supportedLanguageInfo {
+ if inStrSlice(info.tags, lang, false) != -1 {
+ return info, true
+ }
+ }
+ return languageInfo{}, false
+}
+
// applyBuiltInNumFmt provides a function to returns a value after formatted
// with built-in number format code, or specified sort date format code.
func (f *File) applyBuiltInNumFmt(c *xlsxC, fmtCode string, numFmtID int, date1904 bool, cellType CellType) string {
@@ -4797,26 +4826,38 @@ func format(value, numFmt string, date1904 bool, cellType CellType, opts *Option
if nf.isNumeric {
switch section.Type {
case nfp.TokenSectionPositive:
- return nf.positiveHandler()
- case nfp.TokenSectionNegative:
- return nf.negativeHandler()
+ return nf.alignmentHandler(nf.positiveHandler())
default:
- return nf.zeroHandler()
+ return nf.alignmentHandler(nf.negativeHandler())
}
}
- return nf.textHandler()
+ return nf.alignmentHandler(nf.textHandler())
}
return value
}
// getNumberPartLen returns the length of integer and fraction parts for the
// numeric.
-func getNumberPartLen(n float64) (int, int) {
- parts := strings.Split(strconv.FormatFloat(math.Abs(n), 'f', -1, 64), ".")
+func (nf *numberFormat) getNumberPartLen() (int, int) {
+ var intPart, fracPart, intLen, fracLen int
+ parts := strings.Split(strconv.FormatFloat(math.Abs(nf.number), 'f', -1, 64), ".")
+ intPart = len(parts[0])
if len(parts) == 2 {
- return len(parts[0]), len(parts[1])
+ fracPart = len(parts[1])
+ }
+ if nf.intHolder > intPart {
+ nf.intHolder = intPart
+ }
+ if intLen = intPart; nf.intPadding+nf.intHolder > intPart {
+ intLen = nf.intPadding + nf.intHolder
+ }
+ if fracLen = fracPart; fracPart > nf.fracHolder+nf.fracPadding {
+ fracLen = nf.fracHolder + nf.fracPadding
+ }
+ if nf.fracPadding > fracPart {
+ fracLen = nf.fracPadding
}
- return len(parts[0]), 0
+ return intLen, fracLen
}
// getNumberFmtConf generate the number format padding and placeholder
@@ -4994,25 +5035,12 @@ func (nf *numberFormat) printBigNumber(decimal float64, fracLen int) string {
// numberHandler handling number format expression for positive and negative
// numeric.
func (nf *numberFormat) numberHandler() string {
+ nf.getNumberFmtConf()
var (
- num = nf.number
- intPart, fracPart = getNumberPartLen(nf.number)
- intLen, fracLen int
- result string
+ num = nf.number
+ intLen, fracLen = nf.getNumberPartLen()
+ result string
)
- nf.getNumberFmtConf()
- if nf.intHolder > intPart {
- nf.intHolder = intPart
- }
- if intLen = intPart; nf.intPadding+nf.intHolder > intPart {
- intLen = nf.intPadding + nf.intHolder
- }
- if fracLen = fracPart; fracPart > nf.fracHolder+nf.fracPadding {
- fracLen = nf.fracHolder + nf.fracPadding
- }
- if nf.fracPadding > fracPart {
- fracLen = nf.fracPadding
- }
if isNum, precision, decimal := isNumeric(nf.value); isNum {
if precision > 15 && intLen+fracLen > 15 && !nf.useScientificNotation {
return nf.printNumberLiteral(nf.printBigNumber(decimal, fracLen))
@@ -5035,6 +5063,10 @@ func (nf *numberFormat) numberHandler() string {
if nf.useFraction {
num = math.Floor(math.Abs(num))
}
+ if !nf.useScientificNotation {
+ ratio := math.Pow(10, float64(fracLen))
+ num = math.Round(num*ratio) / ratio
+ }
if result = fmt.Sprintf(fmtCode, math.Abs(num)); nf.useCommaSep {
result = printCommaSep(result)
}
@@ -5082,12 +5114,31 @@ func (nf *numberFormat) dateTimeHandler() string {
return nf.printSwitchArgument(nf.result)
}
+// alignmentHandler will be handling alignment token for each number format
+// selection for a number format expression.
+func (nf *numberFormat) alignmentHandler(result string) string {
+ tokens := nf.section[nf.sectionIdx].Items
+ if len(tokens) == 0 {
+ return result
+ }
+ if tokens[0].TType == nfp.TokenTypeAlignment {
+ result = nfp.Whitespace + result
+ }
+ if l := len(tokens); tokens[l-1].TType == nfp.TokenTypeAlignment {
+ result += nfp.Whitespace
+ }
+ return result
+}
+
// positiveHandler will be handling positive selection for a number format
// expression.
func (nf *numberFormat) positiveHandler() string {
var fmtNum bool
for _, token := range nf.section[nf.sectionIdx].Items {
- if inStrSlice(supportedTokenTypes, token.TType, true) == -1 || token.TType == nfp.TokenTypeGeneral {
+ if token.TType == nfp.TokenTypeGeneral {
+ if isNum, precision, _ := isNumeric(nf.value); isNum && precision > 11 {
+ return strconv.FormatFloat(nf.number, 'G', 10, 64)
+ }
return nf.value
}
if inStrSlice(supportedNumberTokenTypes, token.TType, true) != -1 {
@@ -5127,21 +5178,21 @@ func (nf *numberFormat) currencyLanguageHandler(token nfp.Token) (bool, error) {
return false, ErrUnsupportedNumberFormat
}
if part.Token.TType == nfp.TokenSubTypeLanguageInfo {
- if strings.EqualFold(part.Token.TValue, "F800") { // [$-x-sysdate]
+ if inStrSlice([]string{"F800", "x-sysdate", "1010000"}, part.Token.TValue, false) != -1 {
if nf.opts != nil && nf.opts.LongDatePattern != "" {
nf.value = format(nf.value, nf.opts.LongDatePattern, nf.date1904, nf.cellType, nf.opts)
return true, nil
}
part.Token.TValue = "409"
}
- if strings.EqualFold(part.Token.TValue, "F400") { // [$-x-systime]
+ if inStrSlice([]string{"F400", "x-systime"}, part.Token.TValue, false) != -1 {
if nf.opts != nil && nf.opts.LongTimePattern != "" {
nf.value = format(nf.value, nf.opts.LongTimePattern, nf.date1904, nf.cellType, nf.opts)
return true, nil
}
part.Token.TValue = "409"
}
- if _, ok := supportedLanguageInfo[strings.ToUpper(part.Token.TValue)]; !ok {
+ if _, ok := getSupportedLanguageInfo(strings.ToUpper(part.Token.TValue)); !ok {
return false, ErrUnsupportedNumberFormat
}
nf.localCode = strings.ToUpper(part.Token.TValue)
@@ -5155,7 +5206,7 @@ func (nf *numberFormat) currencyLanguageHandler(token nfp.Token) (bool, error) {
// localAmPm return AM/PM name by supported language ID.
func (nf *numberFormat) localAmPm(ap string) string {
- if languageInfo, ok := supportedLanguageInfo[nf.localCode]; ok {
+ if languageInfo, ok := getSupportedLanguageInfo(nf.localCode); ok {
return languageInfo.apFmt
}
return ap
@@ -6798,7 +6849,7 @@ func localMonthsNameZulu(t time.Time, abbr int) string {
// localMonthsName return months name by supported language ID.
func (nf *numberFormat) localMonthsName(abbr int) string {
- if languageInfo, ok := supportedLanguageInfo[nf.localCode]; ok {
+ if languageInfo, ok := getSupportedLanguageInfo(nf.localCode); ok {
return languageInfo.localMonth(nf.t, abbr)
}
return localMonthsNameEnglish(nf.t, abbr)
@@ -6877,7 +6928,8 @@ func (nf *numberFormat) yearsHandler(token nfp.Token) {
if year == -1 {
return
}
- nf.useGannen = supportedLanguageInfo[nf.localCode].useGannen
+ langInfo, _ := getSupportedLanguageInfo(nf.localCode)
+ nf.useGannen = langInfo.useGannen
switch len(token.TValue) {
case 1:
nf.useGannen = false
@@ -6912,7 +6964,8 @@ func (nf *numberFormat) yearsHandler(token nfp.Token) {
// daysHandler will be handling days in the date and times types tokens for a
// number format expression.
func (nf *numberFormat) daysHandler(token nfp.Token) {
- info, l := supportedLanguageInfo[nf.localCode], len(token.TValue)
+ info, _ := getSupportedLanguageInfo(nf.localCode)
+ l := len(token.TValue)
weekdayNames, weekdayNamesAbbr := info.weekdayNames, info.weekdayNamesAbbr
if len(weekdayNames) != 7 {
weekdayNames = weekdayNamesEnglish
@@ -7091,11 +7144,6 @@ func (nf *numberFormat) negativeHandler() (result string) {
return nf.numberHandler()
}
-// zeroHandler will be handling zero selection for a number format expression.
-func (nf *numberFormat) zeroHandler() string {
- return nf.value
-}
-
// textHandler will be handling text selection for a number format expression.
func (nf *numberFormat) textHandler() (result string) {
for _, token := range nf.section[nf.sectionIdx].Items {
@@ -7120,21 +7168,18 @@ func (nf *numberFormat) getValueSectionType(value string) (float64, string) {
return 0, nfp.TokenSectionText
}
number, _ := strconv.ParseFloat(value, 64)
- if number > 0 {
+ if number >= 0 {
return number, nfp.TokenSectionPositive
}
- if number < 0 {
- var hasNeg bool
- for _, sec := range nf.section {
- if sec.Type == nfp.TokenSectionNegative {
- hasNeg = true
- }
- }
- if !hasNeg {
- nf.usePositive = true
- return number, nfp.TokenSectionPositive
+ var hasNeg bool
+ for _, sec := range nf.section {
+ if sec.Type == nfp.TokenSectionNegative {
+ hasNeg = true
}
- return number, nfp.TokenSectionNegative
}
- return number, nfp.TokenSectionZero
+ if !hasNeg {
+ nf.usePositive = true
+ return number, nfp.TokenSectionPositive
+ }
+ return number, nfp.TokenSectionNegative
}
diff --git a/vendor/github.com/xuri/excelize/v2/picture.go b/vendor/github.com/xuri/excelize/v2/picture.go
index 8b006f8e..42be183f 100644
--- a/vendor/github.com/xuri/excelize/v2/picture.go
+++ b/vendor/github.com/xuri/excelize/v2/picture.go
@@ -23,6 +23,18 @@ import (
"strings"
)
+// PictureInsertType defines the type of the picture has been inserted into the
+// worksheet.
+type PictureInsertType int
+
+// Insert picture types.
+const (
+ PictureInsertTypePlaceOverCells PictureInsertType = iota
+ PictureInsertTypePlaceInCell
+ PictureInsertTypeIMAGE
+ PictureInsertTypeDISPIMG
+)
+
// parseGraphicOptions provides a function to parse the format settings of
// the picture with default value.
func parseGraphicOptions(opts *GraphicOptions) *GraphicOptions {
@@ -52,7 +64,10 @@ func parseGraphicOptions(opts *GraphicOptions) *GraphicOptions {
// AddPicture provides the method to add picture in a sheet by given picture
// format set (such as offset, scale, aspect ratio setting and print settings)
// and file path, supported image types: BMP, EMF, EMZ, GIF, JPEG, JPG, PNG,
-// SVG, TIF, TIFF, WMF, and WMZ. This function is concurrency safe. For example:
+// SVG, TIF, TIFF, WMF, and WMZ. This function is concurrency-safe. Note that
+// this function only supports adding pictures placed over the cells currently,
+// and doesn't support adding pictures placed in cells or creating the Kingsoft
+// WPS Office embedded image cells. For example:
//
// package main
//
@@ -125,6 +140,10 @@ func parseGraphicOptions(opts *GraphicOptions) *GraphicOptions {
// The optional parameter "AutoFit" specifies if you make graph object size
// auto-fits the cell, the default value of that is 'false'.
//
+// The optional parameter "AutoFitIgnoreAspect" specifies if fill the cell with
+// the image and ignore its aspect ratio, the default value of that is 'false'.
+// This option only works when the "AutoFit" is enabled.
+//
// The optional parameter "OffsetX" specifies the horizontal offset of the graph
// object with the cell, the default value of that is 0.
//
@@ -167,8 +186,10 @@ func (f *File) AddPicture(sheet, cell, name string, opts *GraphicOptions) error
// AddPictureFromBytes provides the method to add picture in a sheet by given
// picture format set (such as offset, scale, aspect ratio setting and print
// settings), file base name, extension name and file bytes, supported image
-// types: EMF, EMZ, GIF, JPEG, JPG, PNG, SVG, TIF, TIFF, WMF, and WMZ. For
-// example:
+// types: EMF, EMZ, GIF, JPEG, JPG, PNG, SVG, TIF, TIFF, WMF, and WMZ. Note that
+// this function only supports adding pictures placed over the cells currently,
+// and doesn't support adding pictures placed in cells or creating the Kingsoft
+// WPS Office embedded image cells. For example:
//
// package main
//
@@ -211,6 +232,9 @@ func (f *File) AddPictureFromBytes(sheet, cell string, pic *Picture) error {
if !ok {
return ErrImgExt
}
+ if pic.InsertType != PictureInsertTypePlaceOverCells {
+ return ErrParameterInvalid
+ }
options := parseGraphicOptions(pic.Format)
img, _, err := image.DecodeConfig(bytes.NewReader(pic.File))
if err != nil {
@@ -473,8 +497,7 @@ func (f *File) GetPictures(sheet, cell string) ([]Picture, error) {
target := f.getSheetRelationshipsTargetByID(sheet, ws.Drawing.RID)
drawingXML := strings.TrimPrefix(strings.ReplaceAll(target, "..", "xl"), "/")
drawingRelationships := strings.ReplaceAll(
- strings.ReplaceAll(target, "../drawings", "xl/drawings/_rels"), ".xml", ".xml.rels")
-
+ strings.ReplaceAll(drawingXML, "xl/drawings", "xl/drawings/_rels"), ".xml", ".xml.rels")
imgs, err := f.getCellImages(sheet, cell)
if err != nil {
return nil, err
@@ -497,13 +520,14 @@ func (f *File) GetPictureCells(sheet string) ([]string, error) {
}
f.mu.Unlock()
if ws.Drawing == nil {
- return f.getEmbeddedImageCells(sheet)
+ return f.getImageCells(sheet)
}
target := f.getSheetRelationshipsTargetByID(sheet, ws.Drawing.RID)
drawingXML := strings.TrimPrefix(strings.ReplaceAll(target, "..", "xl"), "/")
drawingRelationships := strings.ReplaceAll(
- strings.ReplaceAll(target, "../drawings", "xl/drawings/_rels"), ".xml", ".xml.rels")
- embeddedImageCells, err := f.getEmbeddedImageCells(sheet)
+ strings.ReplaceAll(drawingXML, "xl/drawings", "xl/drawings/_rels"), ".xml", ".xml.rels")
+
+ embeddedImageCells, err := f.getImageCells(sheet)
if err != nil {
return nil, err
}
@@ -577,16 +601,23 @@ func (f *File) getPicture(row, col int, drawingXML, drawingRelationships string)
cond := func(from *xlsxFrom) bool { return from.Col == col && from.Row == row }
cond2 := func(from *decodeFrom) bool { return from.Col == col && from.Row == row }
cb := func(a *xdrCellAnchor, r *xlsxRelationship) {
- pic := Picture{Extension: filepath.Ext(r.Target), Format: &GraphicOptions{}}
- if buffer, _ := f.Pkg.Load(strings.ReplaceAll(r.Target, "..", "xl")); buffer != nil {
+ pic := Picture{Extension: filepath.Ext(r.Target), Format: &GraphicOptions{}, InsertType: PictureInsertTypePlaceOverCells}
+ if buffer, _ := f.Pkg.Load(filepath.ToSlash(filepath.Clean("xl/drawings/" + r.Target))); buffer != nil {
pic.File = buffer.([]byte)
pic.Format.AltText = a.Pic.NvPicPr.CNvPr.Descr
pics = append(pics, pic)
}
}
cb2 := func(a *decodeCellAnchor, r *xlsxRelationship) {
- pic := Picture{Extension: filepath.Ext(r.Target), Format: &GraphicOptions{}}
- if buffer, _ := f.Pkg.Load(strings.ReplaceAll(r.Target, "..", "xl")); buffer != nil {
+ var target string
+ if strings.HasPrefix(r.Target, "/") {
+ target = strings.TrimPrefix(r.Target, "/")
+ } else {
+ target = filepath.ToSlash(filepath.Clean("xl/drawings/" + r.Target))
+ }
+
+ pic := Picture{Extension: filepath.Ext(target), Format: &GraphicOptions{}, InsertType: PictureInsertTypePlaceOverCells}
+ if buffer, _ := f.Pkg.Load(target); buffer != nil {
pic.File = buffer.([]byte)
pic.Format.AltText = a.Pic.NvPicPr.CNvPr.Descr
pics = append(pics, pic)
@@ -715,6 +746,9 @@ func (f *File) drawingResize(sheet, cell string, width, height float64, opts *Gr
asp := float64(cellHeight) / height
height, width = float64(cellHeight), width*asp
}
+ if opts.AutoFitIgnoreAspect {
+ width, height = float64(cellWidth), float64(cellHeight)
+ }
width, height = width-float64(opts.OffsetX), height-float64(opts.OffsetY)
w, h = int(width*opts.ScaleX), int(height*opts.ScaleY)
return
@@ -736,14 +770,21 @@ func (f *File) getPictureCells(drawingXML, drawingRelationships string) ([]strin
cond := func(from *xlsxFrom) bool { return true }
cond2 := func(from *decodeFrom) bool { return true }
cb := func(a *xdrCellAnchor, r *xlsxRelationship) {
- if _, ok := f.Pkg.Load(strings.ReplaceAll(r.Target, "..", "xl")); ok {
+ if _, ok := f.Pkg.Load(filepath.ToSlash(filepath.Clean("xl/drawings/" + r.Target))); ok {
if cell, err := CoordinatesToCellName(a.From.Col+1, a.From.Row+1); err == nil && inStrSlice(cells, cell, true) == -1 {
cells = append(cells, cell)
}
}
}
cb2 := func(a *decodeCellAnchor, r *xlsxRelationship) {
- if _, ok := f.Pkg.Load(strings.ReplaceAll(r.Target, "..", "xl")); ok {
+ var target string
+ if strings.HasPrefix(r.Target, "/") {
+ target = strings.TrimPrefix(r.Target, "/")
+ } else {
+ target = filepath.ToSlash(filepath.Clean("xl/drawings/" + r.Target))
+ }
+
+ if _, ok := f.Pkg.Load(target); ok {
if cell, err := CoordinatesToCellName(a.From.Col+1, a.From.Row+1); err == nil && inStrSlice(cells, cell, true) == -1 {
cells = append(cells, cell)
}
@@ -771,9 +812,9 @@ func (f *File) cellImagesReader() (*decodeCellImages, error) {
return f.DecodeCellImages, nil
}
-// getEmbeddedImageCells returns all the Kingsoft WPS Office embedded image
-// cells reference by given worksheet name.
-func (f *File) getEmbeddedImageCells(sheet string) ([]string, error) {
+// getImageCells returns all the cell images and the Kingsoft WPS
+// Office embedded image cells reference by given worksheet name.
+func (f *File) getImageCells(sheet string) ([]string, error) {
var (
err error
cells []string
@@ -791,14 +832,125 @@ func (f *File) getEmbeddedImageCells(sheet string) ([]string, error) {
}
cells = append(cells, c.R)
}
+ r, err := f.getImageCellRel(&c, &Picture{})
+ if err != nil {
+ return cells, err
+ }
+ if r != nil {
+ cells = append(cells, c.R)
+ }
+
}
}
return cells, err
}
-// getCellImages provides a function to get the Kingsoft WPS Office embedded
-// cell images by given worksheet name and cell reference.
+// getRichDataRichValueRel returns relationship of the cell image by given meta
+// blocks value.
+func (f *File) getRichDataRichValueRel(val string) (*xlsxRelationship, error) {
+ var r *xlsxRelationship
+ idx, err := strconv.Atoi(val)
+ if err != nil {
+ return r, err
+ }
+ richValueRel, err := f.richValueRelReader()
+ if err != nil {
+ return r, err
+ }
+ if idx >= len(richValueRel.Rels) {
+ return r, err
+ }
+ rID := richValueRel.Rels[idx].ID
+ if r = f.getRichDataRichValueRelRelationships(rID); r != nil && r.Type != SourceRelationshipImage {
+ return nil, err
+ }
+ return r, err
+}
+
+// getRichDataWebImagesRel returns relationship of a web image by given meta
+// blocks value.
+func (f *File) getRichDataWebImagesRel(val string) (*xlsxRelationship, error) {
+ var r *xlsxRelationship
+ idx, err := strconv.Atoi(val)
+ if err != nil {
+ return r, err
+ }
+ richValueWebImages, err := f.richValueWebImageReader()
+ if err != nil {
+ return r, err
+ }
+ if idx >= len(richValueWebImages.WebImageSrd) {
+ return r, err
+ }
+ rID := richValueWebImages.WebImageSrd[idx].Blip.RID
+ if r = f.getRichValueWebImageRelationships(rID); r != nil && r.Type != SourceRelationshipImage {
+ return nil, err
+ }
+ return r, err
+}
+
+// getImageCellRel returns the cell image relationship.
+func (f *File) getImageCellRel(c *xlsxC, pic *Picture) (*xlsxRelationship, error) {
+ var r *xlsxRelationship
+ if c.Vm == nil || c.V != formulaErrorVALUE {
+ return r, nil
+ }
+ metaData, err := f.metadataReader()
+ if err != nil {
+ return r, err
+ }
+ vmd := metaData.ValueMetadata
+ if vmd == nil || int(*c.Vm) > len(vmd.Bk) || len(vmd.Bk[*c.Vm-1].Rc) == 0 {
+ return r, err
+ }
+ richValueIdx := vmd.Bk[*c.Vm-1].Rc[0].V
+ richValue, err := f.richValueReader()
+ if err != nil {
+ return r, err
+ }
+ if richValueIdx >= len(richValue.Rv) {
+ return r, err
+ }
+ rv := richValue.Rv[richValueIdx].V
+ if len(rv) == 2 && rv[1] == "5" {
+ pic.InsertType = PictureInsertTypePlaceInCell
+ return f.getRichDataRichValueRel(rv[0])
+ }
+ // cell image inserted by IMAGE formula function
+ if len(rv) > 3 && rv[1]+rv[2] == "10" {
+ pic.InsertType = PictureInsertTypeIMAGE
+ return f.getRichDataWebImagesRel(rv[0])
+ }
+ return r, err
+}
+
+// getCellImages provides a function to get the cell images and
+// the Kingsoft WPS Office embedded cell images by given worksheet name and cell
+// reference.
func (f *File) getCellImages(sheet, cell string) ([]Picture, error) {
+ pics, err := f.getDispImages(sheet, cell)
+ if err != nil {
+ return pics, err
+ }
+ _, err = f.getCellStringFunc(sheet, cell, func(x *xlsxWorksheet, c *xlsxC) (string, bool, error) {
+ pic := Picture{Format: &GraphicOptions{}, InsertType: PictureInsertTypePlaceInCell}
+ r, err := f.getImageCellRel(c, &pic)
+ if err != nil || r == nil {
+ return "", true, err
+ }
+ pic.Extension = filepath.Ext(r.Target)
+ if buffer, _ := f.Pkg.Load(strings.TrimPrefix(strings.ReplaceAll(r.Target, "..", "xl"), "/")); buffer != nil {
+ pic.File = buffer.([]byte)
+ pics = append(pics, pic)
+ }
+ return "", true, nil
+ })
+ return pics, err
+}
+
+// getDispImages provides a function to get the Kingsoft WPS Office embedded
+// cell images by given worksheet name and cell reference.
+func (f *File) getDispImages(sheet, cell string) ([]Picture, error) {
formula, err := f.GetCellFormula(sheet, cell)
if err != nil {
return nil, err
@@ -823,7 +975,7 @@ func (f *File) getCellImages(sheet, cell string) ([]Picture, error) {
if cellImg.Pic.NvPicPr.CNvPr.Name == imgID {
for _, r := range rels.Relationships {
if r.ID == cellImg.Pic.BlipFill.Blip.Embed {
- pic := Picture{Extension: filepath.Ext(r.Target), Format: &GraphicOptions{}}
+ pic := Picture{Extension: filepath.Ext(r.Target), Format: &GraphicOptions{}, InsertType: PictureInsertTypeDISPIMG}
if buffer, _ := f.Pkg.Load("xl/" + r.Target); buffer != nil {
pic.File = buffer.([]byte)
pic.Format.AltText = cellImg.Pic.NvPicPr.CNvPr.Descr
diff --git a/vendor/github.com/xuri/excelize/v2/pivotTable.go b/vendor/github.com/xuri/excelize/v2/pivotTable.go
index 0b6ad3b7..03475c09 100644
--- a/vendor/github.com/xuri/excelize/v2/pivotTable.go
+++ b/vendor/github.com/xuri/excelize/v2/pivotTable.go
@@ -51,6 +51,7 @@ type PivotTableOptions struct {
UseAutoFormatting bool
PageOverThenDown bool
MergeItem bool
+ ClassicLayout bool
CompactData bool
ShowError bool
ShowRowHeaders bool
@@ -58,10 +59,16 @@ type PivotTableOptions struct {
ShowRowStripes bool
ShowColStripes bool
ShowLastColumn bool
+ FieldPrintTitles bool
+ ItemPrintTitles bool
PivotTableStyleName string
}
// PivotTableField directly maps the field settings of the pivot table.
+//
+// Name specifies the name of the data field. Maximum 255 characters
+// are allowed in data field name, excess characters will be truncated.
+//
// Subtotal specifies the aggregation function that applies to this data
// field. The default value is sum. The possible values for this attribute
// are:
@@ -78,15 +85,19 @@ type PivotTableOptions struct {
// Var
// Varp
//
-// Name specifies the name of the data field. Maximum 255 characters
-// are allowed in data field name, excess characters will be truncated.
+// NumFmt specifies the number format ID of the data field, this filed only
+// accepts built-in number format ID and does not support custom number format
+// expression currently.
type PivotTableField struct {
Compact bool
Data string
Name string
Outline bool
+ ShowAll bool
+ InsertBlankRow bool
Subtotal string
DefaultSubtotal bool
+ NumFmt int
}
// AddPivotTable provides the method to add pivot table by given pivot table
@@ -210,6 +221,9 @@ func (f *File) parseFormatPivotTableSet(opts *PivotTableOptions) (*xlsxWorksheet
if !ok {
return dataSheet, pivotTableSheetPath, ErrSheetNotExist{pivotTableSheetName}
}
+ if opts.CompactData && opts.ClassicLayout {
+ return nil, "", ErrPivotTableClassicLayout
+ }
return dataSheet, pivotTableSheetPath, err
}
@@ -260,6 +274,9 @@ func (f *File) getTableFieldsOrder(opts *PivotTableOptions) ([]string, error) {
if err != nil {
return order, err
}
+ if name == "" {
+ return order, ErrParameterInvalid
+ }
order = append(order, name)
}
return order, nil
@@ -272,8 +289,10 @@ func (f *File) addPivotCache(opts *PivotTableOptions) error {
if err != nil {
return newPivotTableDataRangeError(err.Error())
}
- // data range has been checked
- order, _ := f.getTableFieldsOrder(opts)
+ order, err := f.getTableFieldsOrder(opts)
+ if err != nil {
+ return newPivotTableDataRangeError(err.Error())
+ }
topLeftCell, _ := CoordinatesToCellName(coordinates[0], coordinates[1])
bottomRightCell, _ := CoordinatesToCellName(coordinates[2], coordinates[3])
pc := xlsxPivotCacheDefinition{
@@ -337,7 +356,10 @@ func (f *File) addPivotTable(cacheID, pivotTableID int, opts *PivotTableOptions)
MergeItem: &opts.MergeItem,
CreatedVersion: pivotTableVersion,
CompactData: &opts.CompactData,
+ GridDropZones: opts.ClassicLayout,
ShowError: &opts.ShowError,
+ FieldPrintTitles: opts.FieldPrintTitles,
+ ItemPrintTitles: opts.ItemPrintTitles,
DataCaption: "Values",
Location: &xlsxLocation{
Ref: topLeftCell + ":" + bottomRightCell,
@@ -370,6 +392,12 @@ func (f *File) addPivotTable(cacheID, pivotTableID int, opts *PivotTableOptions)
if pt.Name == "" {
pt.Name = fmt.Sprintf("PivotTable%d", pivotTableID)
}
+
+ // set classic layout
+ if opts.ClassicLayout {
+ pt.Compact, pt.CompactData = boolPtr(false), boolPtr(false)
+ }
+
// pivot fields
_ = f.addPivotFields(&pt, opts)
@@ -447,6 +475,7 @@ func (f *File) addPivotDataFields(pt *xlsxPivotTableDefinition, opts *PivotTable
}
dataFieldsSubtotals := f.getPivotTableFieldsSubtotal(opts.Data)
dataFieldsName := f.getPivotTableFieldsName(opts.Data)
+ dataFieldsNumFmtID := f.getPivotTableFieldsNumFmtID(opts.Data)
for idx, dataField := range dataFieldsIndex {
if pt.DataFields == nil {
pt.DataFields = &xlsxDataFields{}
@@ -455,6 +484,7 @@ func (f *File) addPivotDataFields(pt *xlsxPivotTableDefinition, opts *PivotTable
Name: dataFieldsName[idx],
Fld: dataField,
Subtotal: dataFieldsSubtotals[idx],
+ NumFmtID: dataFieldsNumFmtID[idx],
})
}
@@ -518,6 +548,14 @@ func (f *File) addPivotColFields(pt *xlsxPivotTableDefinition, opts *PivotTableO
return err
}
+// setClassicLayout provides a method to set classic layout for pivot table by
+// setting Compact and Outline to false.
+func (fld *xlsxPivotField) setClassicLayout(classicLayout bool) {
+ if classicLayout {
+ fld.Compact, fld.Outline = boolPtr(false), boolPtr(false)
+ }
+}
+
// addPivotFields create pivot fields based on the column order of the first
// row in the data region by given pivot table definition and option.
func (f *File) addPivotFields(pt *xlsxPivotTableDefinition, opts *PivotTableOptions) error {
@@ -535,23 +573,26 @@ func (f *File) addPivotFields(pt *xlsxPivotTableDefinition, opts *PivotTableOpti
} else {
items = append(items, &xlsxItem{T: "default"})
}
-
- pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, &xlsxPivotField{
+ fld := &xlsxPivotField{
Name: f.getPivotTableFieldName(name, opts.Rows),
Axis: "axisRow",
DataField: inPivotTableField(opts.Data, name) != -1,
Compact: &rowOptions.Compact,
Outline: &rowOptions.Outline,
+ ShowAll: rowOptions.ShowAll,
+ InsertBlankRow: rowOptions.InsertBlankRow,
DefaultSubtotal: &rowOptions.DefaultSubtotal,
Items: &xlsxItems{
Count: len(items),
Item: items,
},
- })
+ }
+ fld.setClassicLayout(opts.ClassicLayout)
+ pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, fld)
continue
}
if inPivotTableField(opts.Filter, name) != -1 {
- pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, &xlsxPivotField{
+ fld := &xlsxPivotField{
Axis: "axisPage",
DataField: inPivotTableField(opts.Data, name) != -1,
Name: f.getPivotTableFieldName(name, opts.Columns),
@@ -561,7 +602,9 @@ func (f *File) addPivotFields(pt *xlsxPivotTableDefinition, opts *PivotTableOpti
{T: "default"},
},
},
- })
+ }
+ fld.setClassicLayout(opts.ClassicLayout)
+ pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, fld)
continue
}
if inPivotTableField(opts.Columns, name) != -1 {
@@ -572,27 +615,35 @@ func (f *File) addPivotFields(pt *xlsxPivotTableDefinition, opts *PivotTableOpti
} else {
items = append(items, &xlsxItem{T: "default"})
}
- pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, &xlsxPivotField{
+ fld := &xlsxPivotField{
Name: f.getPivotTableFieldName(name, opts.Columns),
Axis: "axisCol",
DataField: inPivotTableField(opts.Data, name) != -1,
Compact: &columnOptions.Compact,
Outline: &columnOptions.Outline,
+ ShowAll: columnOptions.ShowAll,
+ InsertBlankRow: columnOptions.InsertBlankRow,
DefaultSubtotal: &columnOptions.DefaultSubtotal,
Items: &xlsxItems{
Count: len(items),
Item: items,
},
- })
+ }
+ fld.setClassicLayout(opts.ClassicLayout)
+ pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, fld)
continue
}
if inPivotTableField(opts.Data, name) != -1 {
- pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, &xlsxPivotField{
+ fld := &xlsxPivotField{
DataField: true,
- })
+ }
+ fld.setClassicLayout(opts.ClassicLayout)
+ pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, fld)
continue
}
- pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, &xlsxPivotField{})
+ fld := &xlsxPivotField{}
+ fld.setClassicLayout(opts.ClassicLayout)
+ pt.PivotFields.PivotField = append(pt.PivotFields.PivotField, fld)
}
return err
}
@@ -682,6 +733,22 @@ func (f *File) getPivotTableFieldName(name string, fields []PivotTableField) str
return ""
}
+// getPivotTableFieldsNumFmtID prepare fields number format ID by given pivot
+// table fields.
+func (f *File) getPivotTableFieldsNumFmtID(fields []PivotTableField) []int {
+ field := make([]int, len(fields))
+ for idx, fld := range fields {
+ if _, ok := builtInNumFmt[fld.NumFmt]; ok {
+ field[idx] = fld.NumFmt
+ continue
+ }
+ if (27 <= fld.NumFmt && fld.NumFmt <= 36) || (50 <= fld.NumFmt && fld.NumFmt <= 81) {
+ field[idx] = fld.NumFmt
+ }
+ }
+ return field
+}
+
// getPivotTableFieldOptions return options for specific field by given field name.
func (f *File) getPivotTableFieldOptions(name string, fields []PivotTableField) (options PivotTableField, ok bool) {
for _, field := range fields {
@@ -756,12 +823,11 @@ func (f *File) getPivotTableDataRange(opts *PivotTableOptions) error {
opts.pivotDataRange = opts.DataRange
return nil
}
- for _, sheetName := range f.GetSheetList() {
- tables, err := f.GetTables(sheetName)
- e := ErrSheetNotExist{sheetName}
- if err != nil && err.Error() != newNotWorksheetError(sheetName).Error() && err.Error() != e.Error() {
- return err
- }
+ tbls, err := f.getTables()
+ if err != nil {
+ return err
+ }
+ for sheetName, tables := range tbls {
for _, table := range tables {
if table.Name == opts.DataRange {
opts.pivotDataRange, opts.namedDataRange = fmt.Sprintf("%s!%s", sheetName, table.Range), true
@@ -803,12 +869,15 @@ func (f *File) getPivotTable(sheet, pivotTableXML, pivotCacheRels string) (Pivot
return opts, err
}
opts = PivotTableOptions{
- pivotTableXML: pivotTableXML,
- pivotCacheXML: pivotCacheXML,
- pivotSheetName: sheet,
- DataRange: fmt.Sprintf("%s!%s", sheet, pc.CacheSource.WorksheetSource.Ref),
- PivotTableRange: fmt.Sprintf("%s!%s", sheet, pt.Location.Ref),
- Name: pt.Name,
+ pivotTableXML: pivotTableXML,
+ pivotCacheXML: pivotCacheXML,
+ pivotSheetName: sheet,
+ DataRange: fmt.Sprintf("%s!%s", pc.CacheSource.WorksheetSource.Sheet, pc.CacheSource.WorksheetSource.Ref),
+ PivotTableRange: fmt.Sprintf("%s!%s", sheet, pt.Location.Ref),
+ Name: pt.Name,
+ ClassicLayout: pt.GridDropZones,
+ FieldPrintTitles: pt.FieldPrintTitles,
+ ItemPrintTitles: pt.ItemPrintTitles,
}
if pc.CacheSource.WorksheetSource.Name != "" {
opts.DataRange = pc.CacheSource.WorksheetSource.Name
@@ -886,6 +955,7 @@ func (f *File) extractPivotTableFields(order []string, pt *xlsxPivotTableDefinit
Data: order[field.Fld],
Name: field.Name,
Subtotal: cases.Title(language.English).String(field.Subtotal),
+ NumFmt: field.NumFmtID,
})
}
}
@@ -895,7 +965,9 @@ func (f *File) extractPivotTableFields(order []string, pt *xlsxPivotTableDefinit
// settings by given pivot table fields.
func extractPivotTableField(data string, fld *xlsxPivotField) PivotTableField {
pivotTableField := PivotTableField{
- Data: data,
+ Data: data,
+ ShowAll: fld.ShowAll,
+ InsertBlankRow: fld.InsertBlankRow,
}
fields := []string{"Compact", "Name", "Outline", "Subtotal", "DefaultSubtotal"}
immutable, mutable := reflect.ValueOf(*fld), reflect.ValueOf(&pivotTableField).Elem()
@@ -986,8 +1058,8 @@ func (f *File) DeletePivotTable(sheet, name string) error {
return err
}
pivotTableCaches := map[string]int{}
- for _, sheetName := range f.GetSheetList() {
- sheetPivotTables, _ := f.GetPivotTables(sheetName)
+ pivotTables, _ := f.getPivotTables()
+ for _, sheetPivotTables := range pivotTables {
for _, sheetPivotTable := range sheetPivotTables {
pivotTableCaches[sheetPivotTable.pivotCacheXML]++
}
@@ -1008,3 +1080,17 @@ func (f *File) DeletePivotTable(sheet, name string) error {
}
return newNoExistTableError(name)
}
+
+// getPivotTables provides a function to get all pivot tables in a workbook.
+func (f *File) getPivotTables() (map[string][]PivotTableOptions, error) {
+ pivotTables := map[string][]PivotTableOptions{}
+ for _, sheetName := range f.GetSheetList() {
+ pts, err := f.GetPivotTables(sheetName)
+ e := ErrSheetNotExist{sheetName}
+ if err != nil && err.Error() != newNotWorksheetError(sheetName).Error() && err.Error() != e.Error() {
+ return pivotTables, err
+ }
+ pivotTables[sheetName] = append(pivotTables[sheetName], pts...)
+ }
+ return pivotTables, nil
+}
diff --git a/vendor/github.com/xuri/excelize/v2/rows.go b/vendor/github.com/xuri/excelize/v2/rows.go
index 878c8d85..d43a0150 100644
--- a/vendor/github.com/xuri/excelize/v2/rows.go
+++ b/vendor/github.com/xuri/excelize/v2/rows.go
@@ -59,10 +59,10 @@ var duplicateHelperFunc = [3]func(*File, *xlsxWorksheet, string, int, int) error
// fmt.Println()
// }
func (f *File) GetRows(sheet string, opts ...Options) ([][]string, error) {
- if _, err := f.workSheetReader(sheet); err != nil {
+ rows, err := f.Rows(sheet)
+ if err != nil {
return nil, err
}
- rows, _ := f.Rows(sheet)
results, cur, maxVal := make([][]string, 0, 64), 0, 0
for rows.Next() {
cur++
@@ -70,8 +70,11 @@ func (f *File) GetRows(sheet string, opts ...Options) ([][]string, error) {
if err != nil {
break
}
- results = append(results, row)
if len(row) > 0 {
+ if emptyRows := cur - maxVal - 1; emptyRows > 0 {
+ results = append(results, make([][]string, emptyRows)...)
+ }
+ results = append(results, row)
maxVal = cur
}
}
@@ -392,7 +395,7 @@ func (f *File) getRowHeight(sheet string, row int) int {
defer ws.mu.Unlock()
for i := range ws.SheetData.Row {
v := &ws.SheetData.Row[i]
- if v.R != nil && *v.R == row && v.Ht != nil {
+ if v.R == row && v.Ht != nil {
return int(convertRowHeightToPixels(*v.Ht))
}
}
@@ -423,7 +426,7 @@ func (f *File) GetRowHeight(sheet string, row int) (float64, error) {
return ht, nil // it will be better to use 0, but we take care with BC
}
for _, v := range ws.SheetData.Row {
- if v.R != nil && *v.R == row && v.Ht != nil {
+ if v.R == row && v.Ht != nil {
return *v.Ht, nil
}
}
@@ -578,7 +581,7 @@ func (f *File) RemoveRow(sheet string, row int) error {
keep := 0
for rowIdx := 0; rowIdx < len(ws.SheetData.Row); rowIdx++ {
v := &ws.SheetData.Row[rowIdx]
- if v.R != nil && *v.R != row {
+ if v.R != row {
ws.SheetData.Row[keep] = *v
keep++
}
@@ -649,7 +652,7 @@ func (f *File) DuplicateRowTo(sheet string, row, row2 int) error {
var rowCopy xlsxRow
for i, r := range ws.SheetData.Row {
- if *r.R == row {
+ if r.R == row {
rowCopy = deepcopy.Copy(ws.SheetData.Row[i]).(xlsxRow)
ok = true
break
@@ -666,7 +669,7 @@ func (f *File) DuplicateRowTo(sheet string, row, row2 int) error {
idx2 := -1
for i, r := range ws.SheetData.Row {
- if *r.R == row2 {
+ if r.R == row2 {
idx2 = i
break
}
@@ -688,26 +691,46 @@ func (f *File) DuplicateRowTo(sheet string, row, row2 int) error {
return err
}
+// duplicateSQRefHelper provides a function to adjust conditional formatting and
+// data validations cell reference when duplicate rows.
+func duplicateSQRefHelper(row, row2 int, ref string) (string, error) {
+ if !strings.Contains(ref, ":") {
+ ref += ":" + ref
+ }
+ abs := strings.Contains(ref, "$")
+ coordinates, err := rangeRefToCoordinates(ref)
+ if err != nil {
+ return "", err
+ }
+ x1, y1, x2, y2 := coordinates[0], coordinates[1], coordinates[2], coordinates[3]
+ if y1 == y2 && y1 == row {
+ if ref, err = coordinatesToRangeRef([]int{x1, row2, x2, row2}, abs); err != nil {
+ return "", err
+ }
+ return ref, err
+ }
+ return "", err
+}
+
// duplicateConditionalFormat create conditional formatting for the destination
// row if there are conditional formats in the copied row.
func (f *File) duplicateConditionalFormat(ws *xlsxWorksheet, sheet string, row, row2 int) error {
var cfs []*xlsxConditionalFormatting
for _, cf := range ws.ConditionalFormatting {
if cf != nil {
- if !strings.Contains(cf.SQRef, ":") {
- cf.SQRef += ":" + cf.SQRef
- }
- abs := strings.Contains(cf.SQRef, "$")
- coordinates, err := rangeRefToCoordinates(cf.SQRef)
- if err != nil {
- return err
- }
- x1, y1, x2, y2 := coordinates[0], coordinates[1], coordinates[2], coordinates[3]
- if y1 == y2 && y1 == row {
- cfCopy := deepcopy.Copy(*cf).(xlsxConditionalFormatting)
- if cfCopy.SQRef, err = f.coordinatesToRangeRef([]int{x1, row2, x2, row2}, abs); err != nil {
+ var SQRef []string
+ for _, ref := range strings.Split(cf.SQRef, " ") {
+ coordinates, err := duplicateSQRefHelper(row, row2, ref)
+ if err != nil {
return err
}
+ if coordinates != "" {
+ SQRef = append(SQRef, coordinates)
+ }
+ }
+ if len(SQRef) > 0 {
+ cfCopy := deepcopy.Copy(*cf).(xlsxConditionalFormatting)
+ cfCopy.SQRef = strings.Join(SQRef, " ")
cfs = append(cfs, &cfCopy)
}
}
@@ -725,20 +748,19 @@ func (f *File) duplicateDataValidations(ws *xlsxWorksheet, sheet string, row, ro
var dvs []*xlsxDataValidation
for _, dv := range ws.DataValidations.DataValidation {
if dv != nil {
- if !strings.Contains(dv.Sqref, ":") {
- dv.Sqref += ":" + dv.Sqref
- }
- abs := strings.Contains(dv.Sqref, "$")
- coordinates, err := rangeRefToCoordinates(dv.Sqref)
- if err != nil {
- return err
- }
- x1, y1, x2, y2 := coordinates[0], coordinates[1], coordinates[2], coordinates[3]
- if y1 == y2 && y1 == row {
- dvCopy := deepcopy.Copy(*dv).(xlsxDataValidation)
- if dvCopy.Sqref, err = f.coordinatesToRangeRef([]int{x1, row2, x2, row2}, abs); err != nil {
+ var SQRef []string
+ for _, ref := range strings.Split(dv.Sqref, " ") {
+ coordinates, err := duplicateSQRefHelper(row, row2, ref)
+ if err != nil {
return err
}
+ if coordinates != "" {
+ SQRef = append(SQRef, coordinates)
+ }
+ }
+ if len(SQRef) > 0 {
+ dvCopy := deepcopy.Copy(*dv).(xlsxDataValidation)
+ dvCopy.Sqref = strings.Join(SQRef, " ")
dvs = append(dvs, &dvCopy)
}
}
diff --git a/vendor/github.com/xuri/excelize/v2/sheet.go b/vendor/github.com/xuri/excelize/v2/sheet.go
index 315507db..48cf8841 100644
--- a/vendor/github.com/xuri/excelize/v2/sheet.go
+++ b/vendor/github.com/xuri/excelize/v2/sheet.go
@@ -167,7 +167,7 @@ func (f *File) workSheetWriter() {
_, ok := f.checked.Load(p.(string))
if ok {
f.Sheet.Delete(p.(string))
- f.checked.Store(p.(string), false)
+ f.checked.Delete(p.(string))
}
buffer.Reset()
}
@@ -363,7 +363,7 @@ func (f *File) SetSheetName(source, target string) error {
if err = checkSheetName(target); err != nil {
return err
}
- if strings.EqualFold(target, source) {
+ if target == source {
return err
}
wb, _ := f.workbookReader()
@@ -600,6 +600,49 @@ func (f *File) DeleteSheet(sheet string) error {
return err
}
+// MoveSheet moves a sheet to a specified position in the workbook. The function
+// moves the source sheet before the target sheet. After moving, other sheets
+// will be shifted to the left or right. If the sheet is already at the target
+// position, the function will not perform any action. Not that this function
+// will be ungroup all sheets after moving. For example, move Sheet2 before
+// Sheet1:
+//
+// err := f.MoveSheet("Sheet2", "Sheet1")
+func (f *File) MoveSheet(source, target string) error {
+ if strings.EqualFold(source, target) {
+ return nil
+ }
+ wb, err := f.workbookReader()
+ if err != nil {
+ return err
+ }
+ sourceIdx, err := f.GetSheetIndex(source)
+ if err != nil {
+ return err
+ }
+ targetIdx, err := f.GetSheetIndex(target)
+ if err != nil {
+ return err
+ }
+ if sourceIdx < 0 {
+ return ErrSheetNotExist{source}
+ }
+ if targetIdx < 0 {
+ return ErrSheetNotExist{target}
+ }
+ _ = f.UngroupSheets()
+ activeSheetName := f.GetSheetName(f.GetActiveSheetIndex())
+ sourceSheet := wb.Sheets.Sheet[sourceIdx]
+ wb.Sheets.Sheet = append(wb.Sheets.Sheet[:sourceIdx], wb.Sheets.Sheet[sourceIdx+1:]...)
+ if targetIdx > sourceIdx {
+ targetIdx--
+ }
+ wb.Sheets.Sheet = append(wb.Sheets.Sheet[:targetIdx], append([]xlsxSheet{sourceSheet}, wb.Sheets.Sheet[targetIdx:]...)...)
+ activeSheetIdx, _ := f.GetSheetIndex(activeSheetName)
+ f.SetActiveSheet(activeSheetIdx)
+ return err
+}
+
// deleteAndAdjustDefinedNames delete and adjust defined name in the workbook
// by given worksheet ID.
func deleteAndAdjustDefinedNames(wb *xlsxWorkbook, deleteLocalSheetID int) {
@@ -773,6 +816,11 @@ func (f *File) SetSheetVisible(sheet string, visible bool, veryHidden ...bool) e
return err
}
tabSelected := false
+ if ws.SheetViews == nil {
+ ws.SheetViews = &xlsxSheetViews{
+ SheetView: []xlsxSheetView{{WorkbookViewID: 0}},
+ }
+ }
if len(ws.SheetViews.SheetView) > 0 {
tabSelected = ws.SheetViews.SheetView[0].TabSelected
}
@@ -1652,6 +1700,24 @@ func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error) {
// Comment: "defined name comment",
// Scope: "Sheet2",
// })
+//
+// If you fill the RefersTo property with only one columns range without a
+// comma, it will work as "Columns to repeat at left" only. For example:
+//
+// err := f.SetDefinedName(&excelize.DefinedName{
+// Name: "_xlnm.Print_Titles",
+// RefersTo: "Sheet1!$A:$A",
+// Scope: "Sheet1",
+// })
+//
+// If you fill the RefersTo property with only one rows range without a comma,
+// it will work as "Rows to repeat at top" only. For example:
+//
+// err := f.SetDefinedName(&excelize.DefinedName{
+// Name: "_xlnm.Print_Titles",
+// RefersTo: "Sheet1!$1:$1",
+// Scope: "Sheet1",
+// })
func (f *File) SetDefinedName(definedName *DefinedName) error {
if definedName.Name == "" || definedName.RefersTo == "" {
return ErrParameterInvalid
@@ -1957,7 +2023,7 @@ func (ws *xlsxWorksheet) prepareSheetXML(col int, row int) {
if rowCount < row {
// append missing rows
for rowIdx := rowCount; rowIdx < row; rowIdx++ {
- ws.SheetData.Row = append(ws.SheetData.Row, xlsxRow{R: intPtr(rowIdx + 1), CustomHeight: customHeight, Ht: ht, C: make([]xlsxC, 0, sizeHint)})
+ ws.SheetData.Row = append(ws.SheetData.Row, xlsxRow{R: rowIdx + 1, CustomHeight: customHeight, Ht: ht, C: make([]xlsxC, 0, sizeHint)})
}
}
rowData := &ws.SheetData.Row[row-1]
@@ -2014,7 +2080,7 @@ func (f *File) SetSheetDimension(sheet string, rangeRef string) error {
return err
}
_ = sortCoordinates(coordinates)
- ref, err := f.coordinatesToRangeRef(coordinates)
+ ref, err := coordinatesToRangeRef(coordinates)
ws.Dimension = &xlsxDimension{Ref: ref}
return err
}
diff --git a/vendor/github.com/xuri/excelize/v2/slicer.go b/vendor/github.com/xuri/excelize/v2/slicer.go
index a7f26eda..7b4a2d89 100644
--- a/vendor/github.com/xuri/excelize/v2/slicer.go
+++ b/vendor/github.com/xuri/excelize/v2/slicer.go
@@ -53,17 +53,23 @@ import (
//
// Format specifies the format of the slicer, this setting is optional.
type SlicerOptions struct {
- Name string
- Cell string
- TableSheet string
- TableName string
- Caption string
- Macro string
- Width uint
- Height uint
- DisplayHeader *bool
- ItemDesc bool
- Format GraphicOptions
+ slicerXML string
+ slicerCacheXML string
+ slicerCacheName string
+ slicerSheetName string
+ slicerSheetRID string
+ drawingXML string
+ Name string
+ Cell string
+ TableSheet string
+ TableName string
+ Caption string
+ Macro string
+ Width uint
+ Height uint
+ DisplayHeader *bool
+ ItemDesc bool
+ Format GraphicOptions
}
// AddSlicer function inserts a slicer by giving the worksheet name and slicer
@@ -99,7 +105,7 @@ func (f *File) AddSlicer(sheet string, opts *SlicerOptions) error {
if err != nil {
return err
}
- slicerCacheName, err := f.setSlicerCache(sheet, colIdx, opts, table, pivotTable)
+ slicerCacheName, err := f.setSlicerCache(colIdx, opts, table, pivotTable)
if err != nil {
return err
}
@@ -224,7 +230,6 @@ func (f *File) addSheetSlicer(sheet, extURI string) (int, error) {
slicerID = f.countSlicers() + 1
ws, err = f.workSheetReader(sheet)
decodeExtLst = new(decodeExtLst)
- slicerList = new(decodeSlicerList)
)
if err != nil {
return slicerID, err
@@ -236,6 +241,7 @@ func (f *File) addSheetSlicer(sheet, extURI string) (int, error) {
}
for _, ext := range decodeExtLst.Ext {
if ext.URI == extURI {
+ slicerList := new(decodeSlicerList)
_ = f.xmlNewDecoder(strings.NewReader(ext.Content)).Decode(slicerList)
for _, slicer := range slicerList.Slicer {
if slicer.RID != "" {
@@ -390,14 +396,13 @@ func (f *File) genSlicerCacheName(name string) string {
// setSlicerCache check if a slicer cache already exists or add a new slicer
// cache by giving the column index, slicer, table options, and returns the
// slicer cache name.
-func (f *File) setSlicerCache(sheet string, colIdx int, opts *SlicerOptions, table *Table, pivotTable *PivotTableOptions) (string, error) {
+func (f *File) setSlicerCache(colIdx int, opts *SlicerOptions, table *Table, pivotTable *PivotTableOptions) (string, error) {
var ok bool
var slicerCacheName string
f.Pkg.Range(func(k, v interface{}) bool {
if strings.Contains(k.(string), "xl/slicerCaches/slicerCache") {
- slicerCache := &xlsxSlicerCacheDefinition{}
- if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(v.([]byte)))).
- Decode(slicerCache); err != nil && err != io.EOF {
+ slicerCache, err := f.slicerCacheReader(k.(string))
+ if err != nil {
return true
}
if pivotTable != nil && slicerCache.PivotTables != nil {
@@ -449,6 +454,20 @@ func (f *File) slicerReader(slicerXML string) (*xlsxSlicers, error) {
return slicer, nil
}
+// slicerCacheReader provides a function to get the pointer to the structure
+// after deserialization of xl/slicerCaches/slicerCache%d.xml.
+func (f *File) slicerCacheReader(slicerCacheXML string) (*xlsxSlicerCacheDefinition, error) {
+ content, ok := f.Pkg.Load(slicerCacheXML)
+ slicerCache := &xlsxSlicerCacheDefinition{}
+ if ok && content != nil {
+ if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(content.([]byte)))).
+ Decode(slicerCache); err != nil && err != io.EOF {
+ return nil, err
+ }
+ }
+ return slicerCache, nil
+}
+
// timelineReader provides a function to get the pointer to the structure
// after deserialization of xl/timelines/timeline%d.xml.
func (f *File) timelineReader(timelineXML string) (*xlsxTimelines, error) {
@@ -586,6 +605,7 @@ func (f *File) addDrawingSlicer(sheet, slicerName string, ns xml.Attr, opts *Sli
return err
}
graphicFrame := xlsxGraphicFrame{
+ Macro: opts.Macro,
NvGraphicFramePr: xlsxNvGraphicFramePr{
CNvPr: &xlsxCNvPr{
ID: cNvPrID,
@@ -725,3 +745,306 @@ func (f *File) addWorkbookSlicerCache(slicerCacheID int, URI string) error {
wb.ExtLst = &xlsxExtLst{Ext: strings.TrimSuffix(strings.TrimPrefix(string(extLstBytes), ""), "")}
return err
}
+
+// GetSlicers provides the method to get all slicers in a worksheet by a given
+// worksheet name. Note that, this function does not support getting the height,
+// width, and graphic options of the slicer shape currently.
+func (f *File) GetSlicers(sheet string) ([]SlicerOptions, error) {
+ var (
+ slicers []SlicerOptions
+ ws, err = f.workSheetReader(sheet)
+ decodeExtLst = new(decodeExtLst)
+ )
+ if err != nil {
+ return slicers, err
+ }
+ if ws.ExtLst == nil {
+ return slicers, err
+ }
+ target := f.getSheetRelationshipsTargetByID(sheet, ws.Drawing.RID)
+ drawingXML := strings.TrimPrefix(strings.ReplaceAll(target, "..", "xl"), "/")
+ if err = f.xmlNewDecoder(strings.NewReader("" + ws.ExtLst.Ext + "")).
+ Decode(decodeExtLst); err != nil && err != io.EOF {
+ return slicers, err
+ }
+ for _, ext := range decodeExtLst.Ext {
+ if ext.URI == ExtURISlicerListX14 || ext.URI == ExtURISlicerListX15 {
+ slicerList := new(decodeSlicerList)
+ _ = f.xmlNewDecoder(strings.NewReader(ext.Content)).Decode(&slicerList)
+ for _, slicer := range slicerList.Slicer {
+ if slicer.RID != "" {
+ opts, err := f.getSlicers(sheet, slicer.RID, drawingXML)
+ if err != nil {
+ return slicers, err
+ }
+ slicers = append(slicers, opts...)
+ }
+ }
+ }
+ }
+ return slicers, err
+}
+
+// getSlicerCache provides a function to get a slicer cache by given slicer
+// cache name and slicer options.
+func (f *File) getSlicerCache(slicerCacheName string, opt *SlicerOptions) *xlsxSlicerCacheDefinition {
+ var (
+ err error
+ slicerCache *xlsxSlicerCacheDefinition
+ )
+ f.Pkg.Range(func(k, v interface{}) bool {
+ if strings.Contains(k.(string), "xl/slicerCaches/slicerCache") {
+ slicerCache, err = f.slicerCacheReader(k.(string))
+ if err != nil {
+ return true
+ }
+ if slicerCache.Name == slicerCacheName {
+ opt.slicerCacheXML = k.(string)
+ return false
+ }
+ }
+ return true
+ })
+ return slicerCache
+}
+
+// getSlicers provides a function to get slicers options by given worksheet
+// name, slicer part relationship ID and drawing part path.
+func (f *File) getSlicers(sheet, rID, drawingXML string) ([]SlicerOptions, error) {
+ var (
+ opts []SlicerOptions
+ sheetRelationshipsSlicerXML = f.getSheetRelationshipsTargetByID(sheet, rID)
+ slicerXML = strings.ReplaceAll(sheetRelationshipsSlicerXML, "..", "xl")
+ slicers, err = f.slicerReader(slicerXML)
+ )
+ if err != nil {
+ return opts, err
+ }
+ for _, slicer := range slicers.Slicer {
+ opt := SlicerOptions{
+ slicerXML: slicerXML,
+ slicerCacheName: slicer.Cache,
+ slicerSheetName: sheet,
+ slicerSheetRID: rID,
+ drawingXML: drawingXML,
+ Name: slicer.Name,
+ Caption: slicer.Caption,
+ DisplayHeader: slicer.ShowCaption,
+ }
+ slicerCache := f.getSlicerCache(slicer.Cache, &opt)
+ if slicerCache == nil {
+ return opts, err
+ }
+ if err := f.extractTableSlicer(slicerCache, &opt); err != nil {
+ return opts, err
+ }
+ if err := f.extractPivotTableSlicer(slicerCache, &opt); err != nil {
+ return opts, err
+ }
+ if err = f.extractSlicerCellAnchor(drawingXML, &opt); err != nil {
+ return opts, err
+ }
+ opts = append(opts, opt)
+ }
+ return opts, err
+}
+
+// extractTableSlicer extract table slicer options from slicer cache.
+func (f *File) extractTableSlicer(slicerCache *xlsxSlicerCacheDefinition, opt *SlicerOptions) error {
+ if slicerCache.ExtLst != nil {
+ tables, err := f.getTables()
+ if err != nil {
+ return err
+ }
+ ext := new(xlsxExt)
+ _ = f.xmlNewDecoder(strings.NewReader(slicerCache.ExtLst.Ext)).Decode(ext)
+ if ext.URI == ExtURISlicerCacheDefinition {
+ tableSlicerCache := new(decodeTableSlicerCache)
+ _ = f.xmlNewDecoder(strings.NewReader(ext.Content)).Decode(tableSlicerCache)
+ opt.ItemDesc = tableSlicerCache.SortOrder == "descending"
+ for sheetName, sheetTables := range tables {
+ for _, table := range sheetTables {
+ if tableSlicerCache.TableID == table.tID {
+ opt.TableName = table.Name
+ opt.TableSheet = sheetName
+ }
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// extractPivotTableSlicer extract pivot table slicer options from slicer cache.
+func (f *File) extractPivotTableSlicer(slicerCache *xlsxSlicerCacheDefinition, opt *SlicerOptions) error {
+ pivotTables, err := f.getPivotTables()
+ if err != nil {
+ return err
+ }
+ if slicerCache.PivotTables != nil {
+ for _, pt := range slicerCache.PivotTables.PivotTable {
+ opt.TableName = pt.Name
+ for sheetName, sheetPivotTables := range pivotTables {
+ for _, pivotTable := range sheetPivotTables {
+ if opt.TableName == pivotTable.Name {
+ opt.TableSheet = sheetName
+ }
+ }
+ }
+ }
+ if slicerCache.Data != nil && slicerCache.Data.Tabular != nil {
+ opt.ItemDesc = slicerCache.Data.Tabular.SortOrder == "descending"
+ }
+ }
+ return nil
+}
+
+// extractSlicerCellAnchor extract slicer drawing object from two cell anchor by
+// giving drawing part path and slicer options.
+func (f *File) extractSlicerCellAnchor(drawingXML string, opt *SlicerOptions) error {
+ var (
+ wsDr *xlsxWsDr
+ deCellAnchor = new(decodeCellAnchor)
+ deChoice = new(decodeChoice)
+ err error
+ )
+ if wsDr, _, err = f.drawingParser(drawingXML); err != nil {
+ return err
+ }
+ wsDr.mu.Lock()
+ defer wsDr.mu.Unlock()
+ cond := func(ac *xlsxAlternateContent) bool {
+ if ac != nil {
+ _ = f.xmlNewDecoder(strings.NewReader(ac.Content)).Decode(&deChoice)
+ if deChoice.XMLNSSle15 == NameSpaceDrawingMLSlicerX15.Value || deChoice.XMLNSA14 == NameSpaceDrawingMLA14.Value {
+ if deChoice.GraphicFrame.NvGraphicFramePr.CNvPr.Name == opt.Name {
+ return true
+ }
+ }
+ }
+ return false
+ }
+ for _, anchor := range wsDr.TwoCellAnchor {
+ for _, ac := range anchor.AlternateContent {
+ if cond(ac) {
+ if anchor.From != nil {
+ opt.Macro = deChoice.GraphicFrame.Macro
+ if opt.Cell, err = CoordinatesToCellName(anchor.From.Col+1, anchor.From.Row+1); err != nil {
+ return err
+ }
+ }
+ return err
+ }
+ }
+ _ = f.xmlNewDecoder(strings.NewReader("" + anchor.GraphicFrame + "")).Decode(&deCellAnchor)
+ for _, ac := range deCellAnchor.AlternateContent {
+ if cond(ac) {
+ if deCellAnchor.From != nil {
+ opt.Macro = deChoice.GraphicFrame.Macro
+ if opt.Cell, err = CoordinatesToCellName(deCellAnchor.From.Col+1, deCellAnchor.From.Row+1); err != nil {
+ return err
+ }
+ }
+ return err
+ }
+ }
+ }
+ return err
+}
+
+// getAllSlicers provides a function to get all slicers in a workbook.
+func (f *File) getAllSlicers() (map[string][]SlicerOptions, error) {
+ slicers := map[string][]SlicerOptions{}
+ for _, sheetName := range f.GetSheetList() {
+ sles, err := f.GetSlicers(sheetName)
+ e := ErrSheetNotExist{sheetName}
+ if err != nil && err.Error() != newNotWorksheetError(sheetName).Error() && err.Error() != e.Error() {
+ return slicers, err
+ }
+ slicers[sheetName] = append(slicers[sheetName], sles...)
+ }
+ return slicers, nil
+}
+
+// DeleteSlicer provides the method to delete a slicer by a given slicer name.
+func (f *File) DeleteSlicer(name string) error {
+ sles, err := f.getAllSlicers()
+ if err != nil {
+ return err
+ }
+ for _, slicers := range sles {
+ for _, slicer := range slicers {
+ if slicer.Name != name {
+ continue
+ }
+ _ = f.deleteSlicer(slicer)
+ return f.deleteSlicerCache(sles, slicer)
+ }
+ }
+ return newNoExistSlicerError(name)
+}
+
+// getSlicers provides a function to delete slicer by given slicer options.
+func (f *File) deleteSlicer(opts SlicerOptions) error {
+ slicers, err := f.slicerReader(opts.slicerXML)
+ if err != nil {
+ return err
+ }
+ for i := 0; i < len(slicers.Slicer); i++ {
+ if slicers.Slicer[i].Name == opts.Name {
+ slicers.Slicer = append(slicers.Slicer[:i], slicers.Slicer[i+1:]...)
+ i--
+ }
+ }
+ if len(slicers.Slicer) == 0 {
+ var (
+ extLstBytes []byte
+ ws, err = f.workSheetReader(opts.slicerSheetName)
+ decodeExtLst = new(decodeExtLst)
+ )
+ if err != nil {
+ return err
+ }
+ if err = f.xmlNewDecoder(strings.NewReader("" + ws.ExtLst.Ext + "")).
+ Decode(decodeExtLst); err != nil && err != io.EOF {
+ return err
+ }
+ for i, ext := range decodeExtLst.Ext {
+ if ext.URI == ExtURISlicerListX14 || ext.URI == ExtURISlicerListX15 {
+ slicerList := new(decodeSlicerList)
+ _ = f.xmlNewDecoder(strings.NewReader(ext.Content)).Decode(slicerList)
+ for _, slicer := range slicerList.Slicer {
+ if slicer.RID == opts.slicerSheetRID {
+ decodeExtLst.Ext = append(decodeExtLst.Ext[:i], decodeExtLst.Ext[i+1:]...)
+ extLstBytes, err = xml.Marshal(decodeExtLst)
+ ws.ExtLst = &xlsxExtLst{Ext: strings.TrimSuffix(strings.TrimPrefix(string(extLstBytes), ""), "")}
+ f.Pkg.Delete(opts.slicerXML)
+ _ = f.removeContentTypesPart(ContentTypeSlicer, "/"+opts.slicerXML)
+ f.deleteSheetRelationships(opts.slicerSheetName, opts.slicerSheetRID)
+ return err
+ }
+ }
+ }
+ }
+ }
+ output, err := xml.Marshal(slicers)
+ f.saveFileList(opts.slicerXML, output)
+ return err
+}
+
+// deleteSlicerCache provides a function to delete the slicer cache by giving
+// slicer options if the slicer cache is no longer used.
+func (f *File) deleteSlicerCache(sles map[string][]SlicerOptions, opts SlicerOptions) error {
+ for _, slicers := range sles {
+ for _, slicer := range slicers {
+ if slicer.Name != opts.Name && slicer.slicerCacheName == opts.slicerCacheName {
+ return nil
+ }
+ }
+ }
+ if err := f.DeleteDefinedName(&DefinedName{Name: opts.slicerCacheName}); err != nil {
+ return err
+ }
+ f.Pkg.Delete(opts.slicerCacheXML)
+ return f.removeContentTypesPart(ContentTypeSlicerCache, "/"+opts.slicerCacheXML)
+}
diff --git a/vendor/github.com/xuri/excelize/v2/sparkline.go b/vendor/github.com/xuri/excelize/v2/sparkline.go
index 5d872c3e..4013a2ab 100644
--- a/vendor/github.com/xuri/excelize/v2/sparkline.go
+++ b/vendor/github.com/xuri/excelize/v2/sparkline.go
@@ -18,350 +18,352 @@ import (
"strings"
)
-// sparklineGroupPresets defined the list of sparkline group to create
-// x14:sparklineGroups element by given sparkline style ID.
-var sparklineGroupPresets = []*xlsxX14SparklineGroup{
- {
- ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(5)},
- ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(4)},
- ColorLow: &xlsxColor{Theme: intPtr(4)},
- }, // 0
- {
- ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(5)},
- ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(4)},
- ColorLow: &xlsxColor{Theme: intPtr(4)},
- }, // 1
- {
- ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(6)},
- ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(5)},
- ColorLow: &xlsxColor{Theme: intPtr(5)},
- }, // 2
- {
- ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(7)},
- ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(6)},
- ColorLow: &xlsxColor{Theme: intPtr(6)},
- }, // 3
- {
- ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(8)},
- ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(7)},
- ColorLow: &xlsxColor{Theme: intPtr(7)},
- }, // 4
- {
- ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(9)},
- ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(8)},
- ColorLow: &xlsxColor{Theme: intPtr(8)},
- }, // 5
- {
- ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(4)},
- ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
- ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
- ColorLast: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
- ColorHigh: &xlsxColor{Theme: intPtr(9)},
- ColorLow: &xlsxColor{Theme: intPtr(9)},
- }, // 6
- {
- ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(5)},
- ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(5)},
- ColorLow: &xlsxColor{Theme: intPtr(5)},
- }, // 7
- {
- ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(6)},
- ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- }, // 8
- {
- ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(7)},
- ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- }, // 9
- {
- ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(8)},
- ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- }, // 10
- {
- ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(9)},
- ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- }, // 11
- {
- ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorNegative: &xlsxColor{Theme: intPtr(4)},
- ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- }, // 12
- {
- ColorSeries: &xlsxColor{Theme: intPtr(4)},
- ColorNegative: &xlsxColor{Theme: intPtr(5)},
- ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- }, // 13
- {
- ColorSeries: &xlsxColor{Theme: intPtr(5)},
- ColorNegative: &xlsxColor{Theme: intPtr(6)},
- ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- }, // 14
- {
- ColorSeries: &xlsxColor{Theme: intPtr(6)},
- ColorNegative: &xlsxColor{Theme: intPtr(7)},
- ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- }, // 15
- {
- ColorSeries: &xlsxColor{Theme: intPtr(7)},
- ColorNegative: &xlsxColor{Theme: intPtr(8)},
- ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- }, // 16
- {
- ColorSeries: &xlsxColor{Theme: intPtr(8)},
- ColorNegative: &xlsxColor{Theme: intPtr(9)},
- ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- }, // 17
- {
- ColorSeries: &xlsxColor{Theme: intPtr(9)},
- ColorNegative: &xlsxColor{Theme: intPtr(4)},
- ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- }, // 18
- {
- ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
- }, // 19
- {
- ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
- }, // 20
- {
- ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
- }, // 21
- {
- ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
- }, // 22
- {
- ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
- }, // 23
- {
- ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
- ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: 0.79998168889431442},
- ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
- ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
- }, // 24
- {
- ColorSeries: &xlsxColor{Theme: intPtr(1), Tint: 0.499984740745262},
- ColorNegative: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- ColorMarkers: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
- }, // 25
- {
- ColorSeries: &xlsxColor{Theme: intPtr(1), Tint: 0.34998626667073579},
- ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- ColorMarkers: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- ColorFirst: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- ColorLast: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- ColorHigh: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- ColorLow: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
- }, // 26
- {
- ColorSeries: &xlsxColor{RGB: "FF323232"},
- ColorNegative: &xlsxColor{RGB: "FFD00000"},
- ColorMarkers: &xlsxColor{RGB: "FFD00000"},
- ColorFirst: &xlsxColor{RGB: "FFD00000"},
- ColorLast: &xlsxColor{RGB: "FFD00000"},
- ColorHigh: &xlsxColor{RGB: "FFD00000"},
- ColorLow: &xlsxColor{RGB: "FFD00000"},
- }, // 27
- {
- ColorSeries: &xlsxColor{RGB: "FF000000"},
- ColorNegative: &xlsxColor{RGB: "FF0070C0"},
- ColorMarkers: &xlsxColor{RGB: "FF0070C0"},
- ColorFirst: &xlsxColor{RGB: "FF0070C0"},
- ColorLast: &xlsxColor{RGB: "FF0070C0"},
- ColorHigh: &xlsxColor{RGB: "FF0070C0"},
- ColorLow: &xlsxColor{RGB: "FF0070C0"},
- }, // 28
- {
- ColorSeries: &xlsxColor{RGB: "FF376092"},
- ColorNegative: &xlsxColor{RGB: "FFD00000"},
- ColorMarkers: &xlsxColor{RGB: "FFD00000"},
- ColorFirst: &xlsxColor{RGB: "FFD00000"},
- ColorLast: &xlsxColor{RGB: "FFD00000"},
- ColorHigh: &xlsxColor{RGB: "FFD00000"},
- ColorLow: &xlsxColor{RGB: "FFD00000"},
- }, // 29
- {
- ColorSeries: &xlsxColor{RGB: "FF0070C0"},
- ColorNegative: &xlsxColor{RGB: "FF000000"},
- ColorMarkers: &xlsxColor{RGB: "FF000000"},
- ColorFirst: &xlsxColor{RGB: "FF000000"},
- ColorLast: &xlsxColor{RGB: "FF000000"},
- ColorHigh: &xlsxColor{RGB: "FF000000"},
- ColorLow: &xlsxColor{RGB: "FF000000"},
- }, // 30
- {
- ColorSeries: &xlsxColor{RGB: "FF5F5F5F"},
- ColorNegative: &xlsxColor{RGB: "FFFFB620"},
- ColorMarkers: &xlsxColor{RGB: "FFD70077"},
- ColorFirst: &xlsxColor{RGB: "FF5687C2"},
- ColorLast: &xlsxColor{RGB: "FF359CEB"},
- ColorHigh: &xlsxColor{RGB: "FF56BE79"},
- ColorLow: &xlsxColor{RGB: "FFFF5055"},
- }, // 31
- {
- ColorSeries: &xlsxColor{RGB: "FF5687C2"},
- ColorNegative: &xlsxColor{RGB: "FFFFB620"},
- ColorMarkers: &xlsxColor{RGB: "FFD70077"},
- ColorFirst: &xlsxColor{RGB: "FF777777"},
- ColorLast: &xlsxColor{RGB: "FF359CEB"},
- ColorHigh: &xlsxColor{RGB: "FF56BE79"},
- ColorLow: &xlsxColor{RGB: "FFFF5055"},
- }, // 32
- {
- ColorSeries: &xlsxColor{RGB: "FFC6EFCE"},
- ColorNegative: &xlsxColor{RGB: "FFFFC7CE"},
- ColorMarkers: &xlsxColor{RGB: "FF8CADD6"},
- ColorFirst: &xlsxColor{RGB: "FFFFDC47"},
- ColorLast: &xlsxColor{RGB: "FFFFEB9C"},
- ColorHigh: &xlsxColor{RGB: "FF60D276"},
- ColorLow: &xlsxColor{RGB: "FFFF5367"},
- }, // 33
- {
- ColorSeries: &xlsxColor{RGB: "FF00B050"},
- ColorNegative: &xlsxColor{RGB: "FFFF0000"},
- ColorMarkers: &xlsxColor{RGB: "FF0070C0"},
- ColorFirst: &xlsxColor{RGB: "FFFFC000"},
- ColorLast: &xlsxColor{RGB: "FFFFC000"},
- ColorHigh: &xlsxColor{RGB: "FF00B050"},
- ColorLow: &xlsxColor{RGB: "FFFF0000"},
- }, // 34
- {
- ColorSeries: &xlsxColor{Theme: intPtr(3)},
- ColorNegative: &xlsxColor{Theme: intPtr(9)},
- ColorMarkers: &xlsxColor{Theme: intPtr(8)},
- ColorFirst: &xlsxColor{Theme: intPtr(4)},
- ColorLast: &xlsxColor{Theme: intPtr(5)},
- ColorHigh: &xlsxColor{Theme: intPtr(6)},
- ColorLow: &xlsxColor{Theme: intPtr(7)},
- }, // 35
- {
- ColorSeries: &xlsxColor{Theme: intPtr(1)},
- ColorNegative: &xlsxColor{Theme: intPtr(9)},
- ColorMarkers: &xlsxColor{Theme: intPtr(8)},
- ColorFirst: &xlsxColor{Theme: intPtr(4)},
- ColorLast: &xlsxColor{Theme: intPtr(5)},
- ColorHigh: &xlsxColor{Theme: intPtr(6)},
- ColorLow: &xlsxColor{Theme: intPtr(7)},
- }, // 36
+// getSparklineGroupPresets returns the preset list of sparkline group to create
+// x14:sparklineGroups element.
+func getSparklineGroupPresets() []*xlsxX14SparklineGroup {
+ return []*xlsxX14SparklineGroup{
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(5)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(4)},
+ ColorLow: &xlsxColor{Theme: intPtr(4)},
+ }, // 0
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(5)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(4)},
+ ColorLow: &xlsxColor{Theme: intPtr(4)},
+ }, // 1
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(6)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(5)},
+ ColorLow: &xlsxColor{Theme: intPtr(5)},
+ }, // 2
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(7)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(6)},
+ ColorLow: &xlsxColor{Theme: intPtr(6)},
+ }, // 3
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(8)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(7)},
+ ColorLow: &xlsxColor{Theme: intPtr(7)},
+ }, // 4
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(9)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(8)},
+ ColorLow: &xlsxColor{Theme: intPtr(8)},
+ }, // 5
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(4)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
+ ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
+ ColorLast: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
+ ColorHigh: &xlsxColor{Theme: intPtr(9)},
+ ColorLow: &xlsxColor{Theme: intPtr(9)},
+ }, // 6
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(5)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(5)},
+ ColorLow: &xlsxColor{Theme: intPtr(5)},
+ }, // 7
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(6)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ }, // 8
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(7)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ }, // 9
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(8)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ }, // 10
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(9)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ }, // 11
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorNegative: &xlsxColor{Theme: intPtr(4)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ }, // 12
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(4)},
+ ColorNegative: &xlsxColor{Theme: intPtr(5)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ }, // 13
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(5)},
+ ColorNegative: &xlsxColor{Theme: intPtr(6)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ }, // 14
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(6)},
+ ColorNegative: &xlsxColor{Theme: intPtr(7)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ }, // 15
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(7)},
+ ColorNegative: &xlsxColor{Theme: intPtr(8)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ }, // 16
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(8)},
+ ColorNegative: &xlsxColor{Theme: intPtr(9)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ }, // 17
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(9)},
+ ColorNegative: &xlsxColor{Theme: intPtr(4)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ }, // 18
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(4), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(4), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(4), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(4), Tint: -0.499984740745262},
+ }, // 19
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(5), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(5), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(5), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(5), Tint: -0.499984740745262},
+ }, // 20
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(6), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(6), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(6), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(6), Tint: -0.499984740745262},
+ }, // 21
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(7), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(7), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(7), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(7), Tint: -0.499984740745262},
+ }, // 22
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(8), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(8), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(8), Tint: -0.499984740745262},
+ }, // 23
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(9), Tint: 0.39997558519241921},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: -0.499984740745262},
+ ColorMarkers: &xlsxColor{Theme: intPtr(9), Tint: 0.79998168889431442},
+ ColorFirst: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(9), Tint: -0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
+ ColorLow: &xlsxColor{Theme: intPtr(9), Tint: -0.499984740745262},
+ }, // 24
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(1), Tint: 0.499984740745262},
+ ColorNegative: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ ColorMarkers: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(1), Tint: 0.249977111117893},
+ }, // 25
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(1), Tint: 0.34998626667073579},
+ ColorNegative: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ ColorMarkers: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ ColorFirst: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ ColorLast: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ ColorHigh: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ ColorLow: &xlsxColor{Theme: intPtr(0), Tint: 0.249977111117893},
+ }, // 26
+ {
+ ColorSeries: &xlsxColor{RGB: "FF323232"},
+ ColorNegative: &xlsxColor{RGB: "FFD00000"},
+ ColorMarkers: &xlsxColor{RGB: "FFD00000"},
+ ColorFirst: &xlsxColor{RGB: "FFD00000"},
+ ColorLast: &xlsxColor{RGB: "FFD00000"},
+ ColorHigh: &xlsxColor{RGB: "FFD00000"},
+ ColorLow: &xlsxColor{RGB: "FFD00000"},
+ }, // 27
+ {
+ ColorSeries: &xlsxColor{RGB: "FF000000"},
+ ColorNegative: &xlsxColor{RGB: "FF0070C0"},
+ ColorMarkers: &xlsxColor{RGB: "FF0070C0"},
+ ColorFirst: &xlsxColor{RGB: "FF0070C0"},
+ ColorLast: &xlsxColor{RGB: "FF0070C0"},
+ ColorHigh: &xlsxColor{RGB: "FF0070C0"},
+ ColorLow: &xlsxColor{RGB: "FF0070C0"},
+ }, // 28
+ {
+ ColorSeries: &xlsxColor{RGB: "FF376092"},
+ ColorNegative: &xlsxColor{RGB: "FFD00000"},
+ ColorMarkers: &xlsxColor{RGB: "FFD00000"},
+ ColorFirst: &xlsxColor{RGB: "FFD00000"},
+ ColorLast: &xlsxColor{RGB: "FFD00000"},
+ ColorHigh: &xlsxColor{RGB: "FFD00000"},
+ ColorLow: &xlsxColor{RGB: "FFD00000"},
+ }, // 29
+ {
+ ColorSeries: &xlsxColor{RGB: "FF0070C0"},
+ ColorNegative: &xlsxColor{RGB: "FF000000"},
+ ColorMarkers: &xlsxColor{RGB: "FF000000"},
+ ColorFirst: &xlsxColor{RGB: "FF000000"},
+ ColorLast: &xlsxColor{RGB: "FF000000"},
+ ColorHigh: &xlsxColor{RGB: "FF000000"},
+ ColorLow: &xlsxColor{RGB: "FF000000"},
+ }, // 30
+ {
+ ColorSeries: &xlsxColor{RGB: "FF5F5F5F"},
+ ColorNegative: &xlsxColor{RGB: "FFFFB620"},
+ ColorMarkers: &xlsxColor{RGB: "FFD70077"},
+ ColorFirst: &xlsxColor{RGB: "FF5687C2"},
+ ColorLast: &xlsxColor{RGB: "FF359CEB"},
+ ColorHigh: &xlsxColor{RGB: "FF56BE79"},
+ ColorLow: &xlsxColor{RGB: "FFFF5055"},
+ }, // 31
+ {
+ ColorSeries: &xlsxColor{RGB: "FF5687C2"},
+ ColorNegative: &xlsxColor{RGB: "FFFFB620"},
+ ColorMarkers: &xlsxColor{RGB: "FFD70077"},
+ ColorFirst: &xlsxColor{RGB: "FF777777"},
+ ColorLast: &xlsxColor{RGB: "FF359CEB"},
+ ColorHigh: &xlsxColor{RGB: "FF56BE79"},
+ ColorLow: &xlsxColor{RGB: "FFFF5055"},
+ }, // 32
+ {
+ ColorSeries: &xlsxColor{RGB: "FFC6EFCE"},
+ ColorNegative: &xlsxColor{RGB: "FFFFC7CE"},
+ ColorMarkers: &xlsxColor{RGB: "FF8CADD6"},
+ ColorFirst: &xlsxColor{RGB: "FFFFDC47"},
+ ColorLast: &xlsxColor{RGB: "FFFFEB9C"},
+ ColorHigh: &xlsxColor{RGB: "FF60D276"},
+ ColorLow: &xlsxColor{RGB: "FFFF5367"},
+ }, // 33
+ {
+ ColorSeries: &xlsxColor{RGB: "FF00B050"},
+ ColorNegative: &xlsxColor{RGB: "FFFF0000"},
+ ColorMarkers: &xlsxColor{RGB: "FF0070C0"},
+ ColorFirst: &xlsxColor{RGB: "FFFFC000"},
+ ColorLast: &xlsxColor{RGB: "FFFFC000"},
+ ColorHigh: &xlsxColor{RGB: "FF00B050"},
+ ColorLow: &xlsxColor{RGB: "FFFF0000"},
+ }, // 34
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(3)},
+ ColorNegative: &xlsxColor{Theme: intPtr(9)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8)},
+ ColorFirst: &xlsxColor{Theme: intPtr(4)},
+ ColorLast: &xlsxColor{Theme: intPtr(5)},
+ ColorHigh: &xlsxColor{Theme: intPtr(6)},
+ ColorLow: &xlsxColor{Theme: intPtr(7)},
+ }, // 35
+ {
+ ColorSeries: &xlsxColor{Theme: intPtr(1)},
+ ColorNegative: &xlsxColor{Theme: intPtr(9)},
+ ColorMarkers: &xlsxColor{Theme: intPtr(8)},
+ ColorFirst: &xlsxColor{Theme: intPtr(4)},
+ ColorLast: &xlsxColor{Theme: intPtr(5)},
+ ColorHigh: &xlsxColor{Theme: intPtr(6)},
+ ColorLow: &xlsxColor{Theme: intPtr(7)},
+ }, // 36
+ }
}
// AddSparkline provides a function to add sparklines to the worksheet by
// given formatting options. Sparklines are small charts that fit in a single
// cell and are used to show trends in data. Sparklines are a feature of Excel
-// 2010 and later only. You can write them to an XLSX file that can be read by
-// Excel 2007, but they won't be displayed. For example, add a grouped
-// sparkline. Changes are applied to all three:
+// 2010 and later only. You can write them to workbook that can be read by Excel
+// 2007, but they won't be displayed. For example, add a grouped sparkline.
+// Changes are applied to all three:
//
// err := f.AddSparkline("Sheet1", &excelize.SparklineOptions{
// Location: []string{"A1", "A2", "A3"},
@@ -412,7 +414,7 @@ func (f *File) AddSparkline(sheet string, opts *SparklineOptions) error {
}
sparkType = specifiedSparkTypes
}
- group = sparklineGroupPresets[opts.Style]
+ group = getSparklineGroupPresets()[opts.Style]
group.Type = sparkType
group.ColorAxis = &xlsxColor{RGB: "FF000000"}
group.DisplayEmptyCellsAs = "gap"
diff --git a/vendor/github.com/xuri/excelize/v2/stream.go b/vendor/github.com/xuri/excelize/v2/stream.go
index ef7fa131..125fb4b6 100644
--- a/vendor/github.com/xuri/excelize/v2/stream.go
+++ b/vendor/github.com/xuri/excelize/v2/stream.go
@@ -184,7 +184,7 @@ func (sw *StreamWriter) AddTable(table *Table) error {
}
// Correct table reference range, such correct C1:B3 to B1:C3.
- ref, err := sw.file.coordinatesToRangeRef(coordinates)
+ ref, err := coordinatesToRangeRef(coordinates)
if err != nil {
return err
}
@@ -290,7 +290,7 @@ func (sw *StreamWriter) getRowValues(hRow, hCol, vCol int) (res []string, err er
}
}
-// Check if the token is an XLSX row with the matching row number.
+// Check if the token is an worksheet row with the matching row number.
func getRowElement(token xml.Token, hRow int) (startElement xml.StartElement, ok bool) {
startElement, ok = token.(xml.StartElement)
if !ok {
@@ -527,11 +527,11 @@ func (sw *StreamWriter) setCellValFunc(c *xlsxC, val interface{}) error {
var err error
switch val := val.(type) {
case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
- err = setCellIntFunc(c, val)
+ setCellIntFunc(c, val)
case float32:
- c.T, c.V = setCellFloat(float64(val), -1, 32)
+ c.setCellFloat(float64(val), -1, 32)
case float64:
- c.T, c.V = setCellFloat(val, -1, 64)
+ c.setCellFloat(val, -1, 64)
case string:
c.setCellValue(val)
case []byte:
@@ -554,7 +554,7 @@ func (sw *StreamWriter) setCellValFunc(c *xlsxC, val interface{}) error {
}
// setCellIntFunc is a wrapper of SetCellInt.
-func setCellIntFunc(c *xlsxC, val interface{}) (err error) {
+func setCellIntFunc(c *xlsxC, val interface{}) {
switch val := val.(type) {
case int:
c.T, c.V = setCellInt(val)
@@ -576,9 +576,7 @@ func setCellIntFunc(c *xlsxC, val interface{}) (err error) {
c.T, c.V = setCellUint(uint64(val))
case uint64:
c.T, c.V = setCellUint(val)
- default:
}
- return
}
// writeCell constructs a cell XML and writes it to the buffer.
diff --git a/vendor/github.com/xuri/excelize/v2/styles.go b/vendor/github.com/xuri/excelize/v2/styles.go
index 3b7c28ab..34016514 100644
--- a/vendor/github.com/xuri/excelize/v2/styles.go
+++ b/vendor/github.com/xuri/excelize/v2/styles.go
@@ -1136,7 +1136,7 @@ var (
},
}
- // extractStyleCondFuncs provides a function set to returns if shoudle be
+ // extractStyleCondFuncs provides a function set to returns if should be
// extract style definition by given style.
extractStyleCondFuncs = map[string]func(xlsxXf, *xlsxStyleSheet) bool{
"fill": func(xf xlsxXf, s *xlsxStyleSheet) bool {
@@ -1376,22 +1376,33 @@ var (
}
)
+// colorChoice returns a hex color code from the actual color values.
+func (clr *decodeCTColor) colorChoice() *string {
+ if clr.SrgbClr != nil {
+ return clr.SrgbClr.Val
+ }
+ if clr.SysClr != nil {
+ return &clr.SysClr.LastClr
+ }
+ return nil
+}
+
// GetBaseColor returns the preferred hex color code by giving hex color code,
// indexed color, and theme color.
func (f *File) GetBaseColor(hexColor string, indexedColor int, themeColor *int) string {
if f.Theme != nil && themeColor != nil {
clrScheme := f.Theme.ThemeElements.ClrScheme
if val, ok := map[int]*string{
- 0: &clrScheme.Lt1.SysClr.LastClr,
- 1: &clrScheme.Dk1.SysClr.LastClr,
- 2: clrScheme.Lt2.SrgbClr.Val,
- 3: clrScheme.Dk2.SrgbClr.Val,
- 4: clrScheme.Accent1.SrgbClr.Val,
- 5: clrScheme.Accent2.SrgbClr.Val,
- 6: clrScheme.Accent3.SrgbClr.Val,
- 7: clrScheme.Accent4.SrgbClr.Val,
- 8: clrScheme.Accent5.SrgbClr.Val,
- 9: clrScheme.Accent6.SrgbClr.Val,
+ 0: clrScheme.Lt1.colorChoice(),
+ 1: clrScheme.Dk1.colorChoice(),
+ 2: clrScheme.Lt2.colorChoice(),
+ 3: clrScheme.Dk2.colorChoice(),
+ 4: clrScheme.Accent1.colorChoice(),
+ 5: clrScheme.Accent2.colorChoice(),
+ 6: clrScheme.Accent3.colorChoice(),
+ 7: clrScheme.Accent4.colorChoice(),
+ 8: clrScheme.Accent5.colorChoice(),
+ 9: clrScheme.Accent6.colorChoice(),
}[*themeColor]; ok && val != nil {
return *val
}
@@ -1891,27 +1902,25 @@ func (f *File) newFont(style *Style) (*xlsxFont, error) {
// getNumFmtID provides a function to get number format code ID.
// If given number format code does not exist, will return -1.
-func getNumFmtID(styleSheet *xlsxStyleSheet, style *Style) (numFmtID int) {
- numFmtID = -1
+func getNumFmtID(styleSheet *xlsxStyleSheet, style *Style) int {
+ numFmtID := -1
if _, ok := builtInNumFmt[style.NumFmt]; ok {
return style.NumFmt
}
if (27 <= style.NumFmt && style.NumFmt <= 36) || (50 <= style.NumFmt && style.NumFmt <= 81) {
- numFmtID = style.NumFmt
- return
+ return style.NumFmt
}
if fmtCode, ok := currencyNumFmt[style.NumFmt]; ok {
numFmtID = style.NumFmt
if styleSheet.NumFmts != nil {
for _, numFmt := range styleSheet.NumFmts.NumFmt {
if numFmt.FormatCode == fmtCode {
- numFmtID = numFmt.NumFmtID
- return
+ return numFmt.NumFmtID
}
}
}
}
- return
+ return numFmtID
}
// newNumFmt provides a function to check if number format code in the range
@@ -2186,19 +2195,22 @@ func setCellXfs(style *xlsxStyleSheet, fontID, numFmtID, fillID, borderID int, a
}
// GetCellStyle provides a function to get cell style index by given worksheet
-// name and cell reference.
+// name and cell reference. This function is concurrency safe.
func (f *File) GetCellStyle(sheet, cell string) (int, error) {
+ f.mu.Lock()
ws, err := f.workSheetReader(sheet)
if err != nil {
+ f.mu.Unlock()
return 0, err
}
+ f.mu.Unlock()
+ ws.mu.Lock()
+ defer ws.mu.Unlock()
col, row, err := CellNameToCoordinates(cell)
if err != nil {
return 0, err
}
ws.prepareSheetXML(col, row)
- ws.mu.Lock()
- defer ws.mu.Unlock()
return ws.prepareCellStyle(col, row, ws.SheetData.Row[row-1].C[col-1].S), err
}
@@ -2445,7 +2457,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "cell",
// Criteria: ">",
-// Format: format,
+// Format: &format,
// Value: "6",
// },
// },
@@ -2458,7 +2470,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "cell",
// Criteria: ">",
-// Format: format,
+// Format: &format,
// Value: "$C$1",
// },
// },
@@ -2482,7 +2494,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// }
// err = f.SetConditionalFormat("Sheet1", "D1:D10",
// []excelize.ConditionalFormatOptions{
-// {Type: "cell", Criteria: ">", Format: format, Value: "6"},
+// {Type: "cell", Criteria: ">", Format: &format, Value: "6"},
// },
// )
//
@@ -2534,7 +2546,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "cell",
// Criteria: "between",
-// Format: format,
+// Format: &format,
// MinValue: 6",
// MaxValue: 8",
// },
@@ -2554,7 +2566,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "average",
// Criteria: "=",
-// Format: format1,
+// Format: &format1,
// AboveAverage: true,
// },
// },
@@ -2566,7 +2578,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "average",
// Criteria: "=",
-// Format: format2,
+// Format: &format2,
// AboveAverage: false,
// },
// },
@@ -2578,7 +2590,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// // Highlight cells rules: Duplicate Values...
// err := f.SetConditionalFormat("Sheet1", "A1:A10",
// []excelize.ConditionalFormatOptions{
-// {Type: "duplicate", Criteria: "=", Format: format},
+// {Type: "duplicate", Criteria: "=", Format: &format},
// },
// )
//
@@ -2587,7 +2599,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// // Highlight cells rules: Not Equal To...
// err := f.SetConditionalFormat("Sheet1", "A1:A10",
// []excelize.ConditionalFormatOptions{
-// {Type: "unique", Criteria: "=", Format: format},
+// {Type: "unique", Criteria: "=", Format: &format},
// },
// )
//
@@ -2600,7 +2612,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "top",
// Criteria: "=",
-// Format: format,
+// Format: &format,
// Value: "6",
// },
// },
@@ -2613,7 +2625,7 @@ func (f *File) SetCellStyle(sheet, topLeftCell, bottomRightCell string, styleID
// {
// Type: "top",
// Criteria: "=",
-// Format: format,
+// Format: &format,
// Value: "6",
// Percent: true,
// },
@@ -2931,10 +2943,7 @@ func (f *File) appendCfRule(ws *xlsxWorksheet, rule *xlsxX14CfRule) error {
// settings for cell value (include between, not between, equal, not equal,
// greater than and less than) by given conditional formatting rule.
func (f *File) extractCondFmtCellIs(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{StopIfTrue: c.StopIfTrue, Type: "cell", Criteria: operatorType[c.Operator]}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
+ format := ConditionalFormatOptions{Format: c.DxfID, StopIfTrue: c.StopIfTrue, Type: "cell", Criteria: operatorType[c.Operator]}
if len(c.Formula) == 2 {
format.MinValue, format.MaxValue = c.Formula[0], c.Formula[1]
return format
@@ -2946,21 +2955,13 @@ func (f *File) extractCondFmtCellIs(c *xlsxCfRule, extLst *xlsxExtLst) Condition
// extractCondFmtTimePeriod provides a function to extract conditional format
// settings for time period by given conditional formatting rule.
func (f *File) extractCondFmtTimePeriod(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{StopIfTrue: c.StopIfTrue, Type: "time_period", Criteria: operatorType[c.Operator]}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
+ return ConditionalFormatOptions{Format: c.DxfID, StopIfTrue: c.StopIfTrue, Type: "time_period", Criteria: operatorType[c.Operator]}
}
// extractCondFmtText provides a function to extract conditional format
// settings for text cell values by given conditional formatting rule.
func (f *File) extractCondFmtText(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{StopIfTrue: c.StopIfTrue, Type: "text", Criteria: operatorType[c.Operator], Value: c.Text}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
+ return ConditionalFormatOptions{Format: c.DxfID, StopIfTrue: c.StopIfTrue, Type: "text", Criteria: operatorType[c.Operator], Value: c.Text}
}
// extractCondFmtTop10 provides a function to extract conditional format
@@ -2968,15 +2969,13 @@ func (f *File) extractCondFmtText(c *xlsxCfRule, extLst *xlsxExtLst) Conditional
// rule.
func (f *File) extractCondFmtTop10(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
format := ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "top",
Criteria: "=",
Percent: c.Percent,
Value: strconv.Itoa(c.Rank),
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
if c.Bottom {
format.Type = "bottom"
}
@@ -2988,13 +2987,11 @@ func (f *File) extractCondFmtTop10(c *xlsxCfRule, extLst *xlsxExtLst) Conditiona
// rule.
func (f *File) extractCondFmtAboveAverage(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
format := ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "average",
Criteria: "=",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
if c.AboveAverage != nil {
format.AboveAverage = *c.AboveAverage
}
@@ -3005,7 +3002,8 @@ func (f *File) extractCondFmtAboveAverage(c *xlsxCfRule, extLst *xlsxExtLst) Con
// conditional format settings for duplicate and unique values by given
// conditional formatting rule.
func (f *File) extractCondFmtDuplicateUniqueValues(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{
+ return ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: map[string]string{
"duplicateValues": "duplicate",
@@ -3013,62 +3011,46 @@ func (f *File) extractCondFmtDuplicateUniqueValues(c *xlsxCfRule, extLst *xlsxEx
}[c.Type],
Criteria: "=",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
}
// extractCondFmtBlanks provides a function to extract conditional format
// settings for blank cells by given conditional formatting rule.
func (f *File) extractCondFmtBlanks(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{
+ return ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "blanks",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
}
// extractCondFmtNoBlanks provides a function to extract conditional format
// settings for no blank cells by given conditional formatting rule.
func (f *File) extractCondFmtNoBlanks(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{
+ return ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "no_blanks",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
}
// extractCondFmtErrors provides a function to extract conditional format
// settings for cells with errors by given conditional formatting rule.
func (f *File) extractCondFmtErrors(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{
+ return ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "errors",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
}
// extractCondFmtNoErrors provides a function to extract conditional format
// settings for cells without errors by given conditional formatting rule.
func (f *File) extractCondFmtNoErrors(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{
+ return ConditionalFormatOptions{
+ Format: c.DxfID,
StopIfTrue: c.StopIfTrue,
Type: "no_errors",
}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
- return format
}
// extractCondFmtColorScale provides a function to extract conditional format
@@ -3165,10 +3147,7 @@ func (f *File) extractCondFmtDataBar(c *xlsxCfRule, extLst *xlsxExtLst) Conditio
// extractCondFmtExp provides a function to extract conditional format settings
// for expression by given conditional formatting rule.
func (f *File) extractCondFmtExp(c *xlsxCfRule, extLst *xlsxExtLst) ConditionalFormatOptions {
- format := ConditionalFormatOptions{StopIfTrue: c.StopIfTrue, Type: "formula"}
- if c.DxfID != nil {
- format.Format = *c.DxfID
- }
+ format := ConditionalFormatOptions{Format: c.DxfID, StopIfTrue: c.StopIfTrue, Type: "formula"}
if len(c.Formula) > 0 {
format.Criteria = c.Formula[0]
}
@@ -3234,7 +3213,7 @@ func drawCondFmtCellIs(p int, ct, ref, GUID string, format *ConditionalFormatOpt
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Operator: ct,
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}
// "between" and "not between" criteria require 2 values.
if ct == "between" || ct == "notBetween" {
@@ -3268,7 +3247,7 @@ func drawCondFmtTimePeriod(p int, ct, ref, GUID string, format *ConditionalForma
"continue month": fmt.Sprintf("AND(MONTH(%[1]s)=MONTH(TODAY())+1,OR(YEAR(%[1]s)=YEAR(TODAY()),AND(MONTH(%[1]s)=12,YEAR(%[1]s)=YEAR(TODAY())+1)))", ref),
}[ct],
},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3298,7 +3277,7 @@ func drawCondFmtText(p int, ct, ref, GUID string, format *ConditionalFormatOptio
strings.NewReplacer(`"`, `""`).Replace(format.Value), ref),
}[ct],
},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3312,7 +3291,7 @@ func drawCondFmtTop10(p int, ct, ref, GUID string, format *ConditionalFormatOpti
Bottom: format.Type == "bottom",
Type: validType[format.Type],
Rank: 10,
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
Percent: format.Percent,
}
if rank, err := strconv.Atoi(format.Value); err == nil {
@@ -3330,7 +3309,7 @@ func drawCondFmtAboveAverage(p int, ct, ref, GUID string, format *ConditionalFor
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
AboveAverage: boolPtr(format.AboveAverage),
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3342,7 +3321,7 @@ func drawCondFmtDuplicateUniqueValues(p int, ct, ref, GUID string, format *Condi
Priority: p + 1,
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3430,7 +3409,7 @@ func drawCondFmtExp(p int, ct, ref, GUID string, format *ConditionalFormatOption
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Formula: []string{format.Criteria},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3442,7 +3421,7 @@ func drawCondFmtErrors(p int, ct, ref, GUID string, format *ConditionalFormatOpt
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Formula: []string{fmt.Sprintf("ISERROR(%s)", ref)},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3454,7 +3433,7 @@ func drawCondFmtNoErrors(p int, ct, ref, GUID string, format *ConditionalFormatO
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Formula: []string{fmt.Sprintf("NOT(ISERROR(%s))", ref)},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3466,7 +3445,7 @@ func drawCondFmtBlanks(p int, ct, ref, GUID string, format *ConditionalFormatOpt
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Formula: []string{fmt.Sprintf("LEN(TRIM(%s))=0", ref)},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
@@ -3478,7 +3457,7 @@ func drawCondFmtNoBlanks(p int, ct, ref, GUID string, format *ConditionalFormatO
StopIfTrue: format.StopIfTrue,
Type: validType[format.Type],
Formula: []string{fmt.Sprintf("LEN(TRIM(%s))>0", ref)},
- DxfID: intPtr(format.Format),
+ DxfID: format.Format,
}, nil
}
diff --git a/vendor/github.com/xuri/excelize/v2/table.go b/vendor/github.com/xuri/excelize/v2/table.go
index c0c15944..aec7b260 100644
--- a/vendor/github.com/xuri/excelize/v2/table.go
+++ b/vendor/github.com/xuri/excelize/v2/table.go
@@ -173,11 +173,11 @@ func (f *File) DeleteTable(name string) error {
if err := checkDefinedName(name); err != nil {
return err
}
- for _, sheet := range f.GetSheetList() {
- tables, err := f.GetTables(sheet)
- if err != nil {
- return err
- }
+ tbls, err := f.getTables()
+ if err != nil {
+ return err
+ }
+ for sheet, tables := range tbls {
for _, table := range tables {
if table.Name != name {
continue
@@ -201,6 +201,20 @@ func (f *File) DeleteTable(name string) error {
return newNoExistTableError(name)
}
+// getTables provides a function to get all tables in a workbook.
+func (f *File) getTables() (map[string][]Table, error) {
+ tables := map[string][]Table{}
+ for _, sheetName := range f.GetSheetList() {
+ tbls, err := f.GetTables(sheetName)
+ e := ErrSheetNotExist{sheetName}
+ if err != nil && err.Error() != newNotWorksheetError(sheetName).Error() && err.Error() != e.Error() {
+ return tables, err
+ }
+ tables[sheetName] = append(tables[sheetName], tbls...)
+ }
+ return tables, nil
+}
+
// countTables provides a function to get table files count storage in the
// folder xl/tables.
func (f *File) countTables() int {
@@ -350,7 +364,7 @@ func (f *File) addTable(sheet, tableXML string, x1, y1, x2, y2, i int, opts *Tab
y1++
}
// Correct table range reference, such correct C1:B3 to B1:C3.
- ref, err := f.coordinatesToRangeRef([]int{x1, y1, x2, y2})
+ ref, err := coordinatesToRangeRef([]int{x1, y1, x2, y2})
if err != nil {
return err
}
@@ -463,7 +477,7 @@ func (f *File) AutoFilter(sheet, rangeRef string, opts []AutoFilterOptions) erro
}
_ = sortCoordinates(coordinates)
// Correct reference range, such correct C1:B3 to B1:C3.
- ref, _ := f.coordinatesToRangeRef(coordinates, true)
+ ref, _ := coordinatesToRangeRef(coordinates, true)
wb, err := f.workbookReader()
if err != nil {
return err
@@ -474,7 +488,7 @@ func (f *File) AutoFilter(sheet, rangeRef string, opts []AutoFilterOptions) erro
}
filterRange := fmt.Sprintf("'%s'!%s", sheet, ref)
d := xlsxDefinedName{
- Name: builtInDefinedNames[2],
+ Name: builtInDefinedNames[3],
Hidden: true,
LocalSheetID: intPtr(sheetID),
Data: filterRange,
@@ -490,7 +504,7 @@ func (f *File) AutoFilter(sheet, rangeRef string, opts []AutoFilterOptions) erro
if definedName.LocalSheetID != nil {
localSheetID = *definedName.LocalSheetID
}
- if definedName.Name == builtInDefinedNames[2] && localSheetID == sheetID && definedName.Hidden {
+ if definedName.Name == builtInDefinedNames[3] && localSheetID == sheetID && definedName.Hidden {
wb.DefinedNames.DefinedName[idx].Data = filterRange
definedNameExists = true
}
diff --git a/vendor/github.com/xuri/excelize/v2/templates.go b/vendor/github.com/xuri/excelize/v2/templates.go
index 60c895d8..5aafc43e 100644
--- a/vendor/github.com/xuri/excelize/v2/templates.go
+++ b/vendor/github.com/xuri/excelize/v2/templates.go
@@ -102,8 +102,9 @@ const (
ExtURICalcFeatures = "{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}"
ExtURIConditionalFormattingRuleID = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}"
ExtURIConditionalFormattings = "{78C0D931-6437-407d-A8EE-F0AAD7539E65}"
+ ExtURIDataField = "{E15A36E0-9728-4E99-A89B-3F7291B0FE68}"
ExtURIDataModel = "{FCE2AD5D-F65C-4FA6-A056-5C36A1767C68}"
- ExtURIDataValidations = "{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}"
+ ExtURIDataValidations = "{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}"
ExtURIDrawingBlip = "{28A0092B-C50C-407E-A947-70E740481C1C}"
ExtURIExternalLinkPr = "{FCE6A71B-6B00-49CD-AB44-F6B1AE7CDE65}"
ExtURIIgnoredErrors = "{01252117-D84E-4E92-8308-4BE1C098FCBB}"
@@ -112,6 +113,9 @@ const (
ExtURIPivotCacheDefinition = "{725AE2AE-9491-48be-B2B4-4EB974FC3084}"
ExtURIPivotCachesX14 = "{876F7934-8845-4945-9796-88D515C7AA90}"
ExtURIPivotCachesX15 = "{841E416B-1EF1-43b6-AB56-02D37102CBD5}"
+ ExtURIPivotField = "{2946ED86-A175-432a-8AC1-64E0C546D7DE}"
+ ExtURIPivotFilter = "{0605FD5F-26C8-4aeb-8148-2DB25E43C511}"
+ ExtURIPivotHierarchy = "{F1805F06-0CD304483-9156-8803C3D141DF}"
ExtURIPivotTableReferences = "{983426D0-5260-488c-9760-48F4B6AC55F4}"
ExtURIProtectedRanges = "{FC87AEE6-9EDD-4A0A-B7FB-166176984837}"
ExtURISlicerCacheDefinition = "{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}"
@@ -266,19 +270,25 @@ var supportedChartDataLabelsPosition = map[ChartType][]ChartDataLabelPositionTyp
}
const (
- defaultTempFileSST = "sharedStrings"
- defaultXMLPathCalcChain = "xl/calcChain.xml"
- defaultXMLPathCellImages = "xl/cellimages.xml"
- defaultXMLPathCellImagesRels = "xl/_rels/cellimages.xml.rels"
- defaultXMLPathContentTypes = "[Content_Types].xml"
- defaultXMLPathDocPropsApp = "docProps/app.xml"
- defaultXMLPathDocPropsCore = "docProps/core.xml"
- defaultXMLPathSharedStrings = "xl/sharedStrings.xml"
- defaultXMLPathStyles = "xl/styles.xml"
- defaultXMLPathTheme = "xl/theme/theme1.xml"
- defaultXMLPathVolatileDeps = "xl/volatileDependencies.xml"
- defaultXMLPathWorkbook = "xl/workbook.xml"
- defaultXMLPathWorkbookRels = "xl/_rels/workbook.xml.rels"
+ defaultTempFileSST = "sharedStrings"
+ defaultXMLMetadata = "xl/metadata.xml"
+ defaultXMLPathCalcChain = "xl/calcChain.xml"
+ defaultXMLPathCellImages = "xl/cellimages.xml"
+ defaultXMLPathCellImagesRels = "xl/_rels/cellimages.xml.rels"
+ defaultXMLPathContentTypes = "[Content_Types].xml"
+ defaultXMLPathDocPropsApp = "docProps/app.xml"
+ defaultXMLPathDocPropsCore = "docProps/core.xml"
+ defaultXMLPathSharedStrings = "xl/sharedStrings.xml"
+ defaultXMLPathStyles = "xl/styles.xml"
+ defaultXMLPathTheme = "xl/theme/theme1.xml"
+ defaultXMLPathVolatileDeps = "xl/volatileDependencies.xml"
+ defaultXMLPathWorkbook = "xl/workbook.xml"
+ defaultXMLPathWorkbookRels = "xl/_rels/workbook.xml.rels"
+ defaultXMLRdRichValuePart = "xl/richData/rdrichvalue.xml"
+ defaultXMLRdRichValueRel = "xl/richData/richValueRel.xml"
+ defaultXMLRdRichValueRelRels = "xl/richData/_rels/richValueRel.xml.rels"
+ defaultXMLRdRichValueWebImagePart = "xl/richData/rdRichValueWebImage.xml"
+ defaultXMLRdRichValueWebImagePartRels = "xl/richData/_rels/rdRichValueWebImage.xml.rels"
)
// IndexedColorMapping is the table of default mappings from indexed color value
diff --git a/vendor/github.com/xuri/excelize/v2/xmlChart.go b/vendor/github.com/xuri/excelize/v2/xmlChart.go
index c5d601e0..90c29fcf 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlChart.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlChart.go
@@ -300,26 +300,26 @@ type cView3D struct {
// cPlotArea directly maps the plotArea element. This element specifies the
// plot area of the chart.
type cPlotArea struct {
- Layout *string `xml:"layout"`
- AreaChart *cCharts `xml:"areaChart"`
- Area3DChart *cCharts `xml:"area3DChart"`
- BarChart *cCharts `xml:"barChart"`
- Bar3DChart *cCharts `xml:"bar3DChart"`
- BubbleChart *cCharts `xml:"bubbleChart"`
- DoughnutChart *cCharts `xml:"doughnutChart"`
- LineChart *cCharts `xml:"lineChart"`
- Line3DChart *cCharts `xml:"line3DChart"`
- PieChart *cCharts `xml:"pieChart"`
- Pie3DChart *cCharts `xml:"pie3DChart"`
- OfPieChart *cCharts `xml:"ofPieChart"`
- RadarChart *cCharts `xml:"radarChart"`
- ScatterChart *cCharts `xml:"scatterChart"`
- Surface3DChart *cCharts `xml:"surface3DChart"`
- SurfaceChart *cCharts `xml:"surfaceChart"`
- CatAx []*cAxs `xml:"catAx"`
- ValAx []*cAxs `xml:"valAx"`
- SerAx []*cAxs `xml:"serAx"`
- SpPr *cSpPr `xml:"spPr"`
+ Layout *string `xml:"layout"`
+ AreaChart []*cCharts `xml:"areaChart"`
+ Area3DChart []*cCharts `xml:"area3DChart"`
+ BarChart []*cCharts `xml:"barChart"`
+ Bar3DChart []*cCharts `xml:"bar3DChart"`
+ BubbleChart []*cCharts `xml:"bubbleChart"`
+ DoughnutChart []*cCharts `xml:"doughnutChart"`
+ LineChart []*cCharts `xml:"lineChart"`
+ Line3DChart []*cCharts `xml:"line3DChart"`
+ PieChart []*cCharts `xml:"pieChart"`
+ Pie3DChart []*cCharts `xml:"pie3DChart"`
+ OfPieChart []*cCharts `xml:"ofPieChart"`
+ RadarChart []*cCharts `xml:"radarChart"`
+ ScatterChart []*cCharts `xml:"scatterChart"`
+ Surface3DChart []*cCharts `xml:"surface3DChart"`
+ SurfaceChart []*cCharts `xml:"surfaceChart"`
+ CatAx []*cAxs `xml:"catAx"`
+ ValAx []*cAxs `xml:"valAx"`
+ SerAx []*cAxs `xml:"serAx"`
+ SpPr *cSpPr `xml:"spPr"`
}
// cCharts specifies the common element of the chart.
@@ -530,20 +530,21 @@ type ChartNumFmt struct {
// ChartAxis directly maps the format settings of the chart axis.
type ChartAxis struct {
- None bool
- MajorGridLines bool
- MinorGridLines bool
- MajorUnit float64
- TickLabelSkip int
- ReverseOrder bool
- Secondary bool
- Maximum *float64
- Minimum *float64
- Font Font
- LogBase float64
- NumFmt ChartNumFmt
- Title []RichTextRun
- axID int
+ None bool
+ MajorGridLines bool
+ MinorGridLines bool
+ MajorUnit float64
+ TickLabelPosition ChartTickLabelPositionType
+ TickLabelSkip int
+ ReverseOrder bool
+ Secondary bool
+ Maximum *float64
+ Minimum *float64
+ Font Font
+ LogBase float64
+ NumFmt ChartNumFmt
+ Title []RichTextRun
+ axID int
}
// ChartDimension directly maps the dimension of the chart.
diff --git a/vendor/github.com/xuri/excelize/v2/xmlDecodeDrawing.go b/vendor/github.com/xuri/excelize/v2/xmlDecodeDrawing.go
index 8cd7625f..a59e7c45 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlDecodeDrawing.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlDecodeDrawing.go
@@ -24,7 +24,7 @@ type decodeCellAnchor struct {
Sp *decodeSp `xml:"sp"`
Pic *decodePic `xml:"pic"`
ClientData *decodeClientData `xml:"clientData"`
- AlternateContent []*xlsxAlternateContent `xml:"mc:AlternateContent"`
+ AlternateContent []*xlsxAlternateContent `xml:"AlternateContent"`
Content string `xml:",innerxml"`
}
@@ -36,7 +36,7 @@ type decodeCellAnchorPos struct {
To *xlsxTo `xml:"to"`
Pos *xlsxInnerXML `xml:"pos"`
Ext *xlsxInnerXML `xml:"ext"`
- Sp *xlsxInnerXML `xml:"sp"`
+ Sp *xlsxSp `xml:"sp"`
GrpSp *xlsxInnerXML `xml:"grpSp"`
GraphicFrame *xlsxInnerXML `xml:"graphicFrame"`
CxnSp *xlsxInnerXML `xml:"cxnSp"`
@@ -46,19 +46,39 @@ type decodeCellAnchorPos struct {
ClientData *xlsxInnerXML `xml:"clientData"`
}
-// xdrSp (Shape) directly maps the sp element. This element specifies the
-// existence of a single shape. A shape can either be a preset or a custom
-// geometry, defined using the SpreadsheetDrawingML framework. In addition to
-// a geometry each shape can have both visual and non-visual properties
-// attached. Text and corresponding styling information can also be attached
-// to a shape. This shape is specified along with all other shapes within
-// either the shape tree or group shape elements.
+// decodeChoice defines the structure used to deserialize the mc:Choice element.
+type decodeChoice struct {
+ XMLName xml.Name `xml:"Choice"`
+ XMLNSA14 string `xml:"a14,attr"`
+ XMLNSSle15 string `xml:"sle15,attr"`
+ Requires string `xml:"Requires,attr"`
+ GraphicFrame decodeGraphicFrame `xml:"graphicFrame"`
+}
+
+// decodeGraphicFrame defines the structure used to deserialize the
+// xdr:graphicFrame element.
+type decodeGraphicFrame struct {
+ Macro string `xml:"macro,attr"`
+ NvGraphicFramePr decodeNvGraphicFramePr `xml:"nvGraphicFramePr"`
+}
+
+// decodeNvGraphicFramePr defines the structure used to deserialize the
+// xdr:nvGraphicFramePr element.
+type decodeNvGraphicFramePr struct {
+ CNvPr decodeCNvPr `xml:"cNvPr"`
+}
+
+// decodeSp defines the structure used to deserialize the sp element.
type decodeSp struct {
- NvSpPr *decodeNvSpPr `xml:"nvSpPr"`
- SpPr *decodeSpPr `xml:"spPr"`
+ Macro string `xml:"macro,attr,omitempty"`
+ TextLink string `xml:"textlink,attr,omitempty"`
+ FLocksText bool `xml:"fLocksText,attr,omitempty"`
+ FPublished *bool `xml:"fPublished,attr"`
+ NvSpPr *decodeNvSpPr `xml:"nvSpPr"`
+ SpPr *decodeSpPr `xml:"spPr"`
}
-// decodeSp (Non-Visual Properties for a Shape) directly maps the nvSpPr
+// decodeNvSpPr (Non-Visual Properties for a Shape) directly maps the nvSpPr
// element. This element specifies all non-visual properties for a shape. This
// element is a container for the non-visual identification properties, shape
// properties and application properties that are to be associated with a
diff --git a/vendor/github.com/xuri/excelize/v2/xmlDrawing.go b/vendor/github.com/xuri/excelize/v2/xmlDrawing.go
index 5cca3cf2..3d39d35d 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlDrawing.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlDrawing.go
@@ -238,7 +238,7 @@ type xlsxCellAnchorPos struct {
To *xlsxTo `xml:"xdr:to"`
Pos *xlsxInnerXML `xml:"xdr:pos"`
Ext *xlsxInnerXML `xml:"xdr:ext"`
- Sp *xlsxInnerXML `xml:"xdr:sp"`
+ Sp *xlsxSp `xml:"xdr:sp"`
GrpSp *xlsxInnerXML `xml:"xdr:grpSp"`
GraphicFrame *xlsxInnerXML `xml:"xdr:graphicFrame"`
CxnSp *xlsxInnerXML `xml:"xdr:cxnSp"`
@@ -248,6 +248,21 @@ type xlsxCellAnchorPos struct {
ClientData *xlsxInnerXML `xml:"xdr:clientData"`
}
+// xdrSp (Shape) directly maps the sp element. This element specifies the
+// existence of a single shape. A shape can either be a preset or a custom
+// geometry, defined using the SpreadsheetDrawingML framework. In addition to
+// a geometry each shape can have both visual and non-visual properties
+// attached. Text and corresponding styling information can also be attached
+// to a shape. This shape is specified along with all other shapes within
+// either the shape tree or group shape elements.
+type xlsxSp struct {
+ Macro string `xml:"macro,attr,omitempty"`
+ TextLink string `xml:"textlink,attr,omitempty"`
+ FLocksText bool `xml:"fLocksText,attr,omitempty"`
+ FPublished *bool `xml:"fPublished,attr"`
+ Content string `xml:",innerxml"`
+}
+
// xlsxPoint2D describes the position of a drawing element within a spreadsheet.
type xlsxPoint2D struct {
XMLName xml.Name `xml:"xdr:pos"`
@@ -409,25 +424,27 @@ type xdrTxBody struct {
// Picture maps the format settings of the picture.
type Picture struct {
- Extension string
- File []byte
- Format *GraphicOptions
+ Extension string
+ File []byte
+ Format *GraphicOptions
+ InsertType PictureInsertType
}
// GraphicOptions directly maps the format settings of the picture.
type GraphicOptions struct {
- AltText string
- PrintObject *bool
- Locked *bool
- LockAspectRatio bool
- AutoFit bool
- OffsetX int
- OffsetY int
- ScaleX float64
- ScaleY float64
- Hyperlink string
- HyperlinkType string
- Positioning string
+ AltText string
+ PrintObject *bool
+ Locked *bool
+ LockAspectRatio bool
+ AutoFit bool
+ AutoFitIgnoreAspect bool
+ OffsetX int
+ OffsetY int
+ ScaleX float64
+ ScaleY float64
+ Hyperlink string
+ HyperlinkType string
+ Positioning string
}
// Shape directly maps the format settings of the shape.
diff --git a/vendor/github.com/xuri/excelize/v2/xmlMetaData.go b/vendor/github.com/xuri/excelize/v2/xmlMetaData.go
new file mode 100644
index 00000000..016e3486
--- /dev/null
+++ b/vendor/github.com/xuri/excelize/v2/xmlMetaData.go
@@ -0,0 +1,117 @@
+// Copyright 2016 - 2024 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 XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and
+// writing spreadsheet documents generated by Microsoft Excel™ 2007 and later.
+// Supports complex components by high compatibility, and provided streaming
+// API for generating or reading data from a worksheet with huge amounts of
+// data. This library needs Go version 1.18 or later.
+
+package excelize
+
+import "encoding/xml"
+
+// xlsxMetadata directly maps the metadata element. A cell in a spreadsheet
+// application can have metadata associated with it. Metadata is just a set of
+// additional properties about the particular cell, and this metadata is stored
+// in the metadata xml part. There are two types of metadata: cell metadata and
+// value metadata. Cell metadata contains information about the cell itself,
+// and this metadata can be carried along with the cell as it moves
+// (insert, shift, copy/paste, merge, unmerge, etc). Value metadata is
+// information about the value of a particular cell. Value metadata properties
+// can be propagated along with the value as it is referenced in formulas.
+type xlsxMetadata struct {
+ XMLName xml.Name `xml:"metadata"`
+ MetadataTypes *xlsxInnerXML `xml:"metadataTypes"`
+ MetadataStrings *xlsxInnerXML `xml:"metadataStrings"`
+ MdxMetadata *xlsxInnerXML `xml:"mdxMetadata"`
+ FutureMetadata []xlsxFutureMetadata `xml:"futureMetadata"`
+ CellMetadata *xlsxMetadataBlocks `xml:"cellMetadata"`
+ ValueMetadata *xlsxMetadataBlocks `xml:"valueMetadata"`
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxFutureMetadata directly maps the futureMetadata element. This element
+// represents future metadata information.
+type xlsxFutureMetadata struct {
+ Bk []xlsxFutureMetadataBlock `xml:"bk"`
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxFutureMetadataBlock directly maps the kb element. This element represents
+// a block of future metadata information. This is a location for storing
+// feature extension information.
+type xlsxFutureMetadataBlock struct {
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxMetadataBlocks directly maps the metadata element. This element
+// represents cell metadata information. Cell metadata is information metadata
+// about a specific cell, and it stays tied to that cell position.
+type xlsxMetadataBlocks struct {
+ Count int `xml:"count,attr,omitempty"`
+ Bk []xlsxMetadataBlock `xml:"bk"`
+}
+
+// xlsxMetadataBlock directly maps the bk element. This element represents a
+// block of metadata records.
+type xlsxMetadataBlock struct {
+ Rc []xlsxMetadataRecord `xml:"rc"`
+}
+
+// xlsxMetadataRecord directly maps the rc element. This element represents a
+// reference to a specific metadata record.
+type xlsxMetadataRecord struct {
+ T int `xml:"t,attr"`
+ V int `xml:"v,attr"`
+}
+
+// xlsxRichValueData directly maps the rvData element that specifies rich value
+// data.
+type xlsxRichValueData struct {
+ XMLName xml.Name `xml:"rvData"`
+ Count int `xml:"count,attr,omitempty"`
+ Rv []xlsxRichValue `xml:"rv"`
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxRichValue directly maps the rv element that specifies rich value data
+// information for a single rich value
+type xlsxRichValue struct {
+ S int `xml:"s,attr"`
+ V []string `xml:"v"`
+ Fb *xlsxInnerXML `xml:"fb"`
+}
+
+// xlsxRichValueRels directly maps the richValueRels element. This element that
+// specifies a list of rich value relationships.
+type xlsxRichValueRels struct {
+ XMLName xml.Name `xml:"richValueRels"`
+ Rels []xlsxRichValueRelRelationship `xml:"rel"`
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxRichValueRelRelationship directly maps the rel element. This element
+// specifies a relationship for a rich value property.
+type xlsxRichValueRelRelationship struct {
+ ID string `xml:"id,attr"`
+}
+
+// xlsxWebImagesSupportingRichData directly maps the webImagesSrd element. This
+// element specifies a list of sets of properties associated with web image rich
+// values.
+type xlsxWebImagesSupportingRichData struct {
+ XMLName xml.Name `xml:"webImagesSrd"`
+ WebImageSrd []xlsxWebImageSupportingRichData `xml:"webImageSrd"`
+ ExtLst *xlsxInnerXML `xml:"extLst"`
+}
+
+// xlsxWebImageSupportingRichData directly maps the webImageSrd element. This
+// element specifies a set of properties for a web image rich value.
+type xlsxWebImageSupportingRichData struct {
+ Address xlsxExternalReference `xml:"address"`
+ MoreImagesAddress xlsxExternalReference `xml:"moreImagesAddress"`
+ Blip xlsxExternalReference `xml:"blip"`
+}
diff --git a/vendor/github.com/xuri/excelize/v2/xmlPivotTable.go b/vendor/github.com/xuri/excelize/v2/xmlPivotTable.go
index 41405c3e..8937503b 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlPivotTable.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlPivotTable.go
@@ -56,15 +56,15 @@ type xlsxPivotTableDefinition struct {
EnableDrill bool `xml:"enableDrill,attr,omitempty"`
EnableFieldProperties bool `xml:"enableFieldProperties,attr,omitempty"`
PreserveFormatting bool `xml:"preserveFormatting,attr,omitempty"`
- UseAutoFormatting *bool `xml:"useAutoFormatting,attr,omitempty"`
+ UseAutoFormatting *bool `xml:"useAutoFormatting,attr"`
PageWrap int `xml:"pageWrap,attr,omitempty"`
- PageOverThenDown *bool `xml:"pageOverThenDown,attr,omitempty"`
+ PageOverThenDown *bool `xml:"pageOverThenDown,attr"`
SubtotalHiddenItems bool `xml:"subtotalHiddenItems,attr,omitempty"`
- RowGrandTotals *bool `xml:"rowGrandTotals,attr,omitempty"`
- ColGrandTotals *bool `xml:"colGrandTotals,attr,omitempty"`
+ RowGrandTotals *bool `xml:"rowGrandTotals,attr"`
+ ColGrandTotals *bool `xml:"colGrandTotals,attr"`
FieldPrintTitles bool `xml:"fieldPrintTitles,attr,omitempty"`
ItemPrintTitles bool `xml:"itemPrintTitles,attr,omitempty"`
- MergeItem *bool `xml:"mergeItem,attr,omitempty"`
+ MergeItem *bool `xml:"mergeItem,attr"`
ShowDropZones bool `xml:"showDropZones,attr,omitempty"`
CreatedVersion int `xml:"createdVersion,attr,omitempty"`
Indent int `xml:"indent,attr,omitempty"`
@@ -74,7 +74,7 @@ type xlsxPivotTableDefinition struct {
Compact *bool `xml:"compact,attr"`
Outline *bool `xml:"outline,attr"`
OutlineData bool `xml:"outlineData,attr,omitempty"`
- CompactData *bool `xml:"compactData,attr,omitempty"`
+ CompactData *bool `xml:"compactData,attr"`
Published bool `xml:"published,attr,omitempty"`
GridDropZones bool `xml:"gridDropZones,attr,omitempty"`
Immersive bool `xml:"immersive,attr,omitempty"`
@@ -150,7 +150,7 @@ type xlsxPivotField struct {
DataSourceSort bool `xml:"dataSourceSort,attr,omitempty"`
NonAutoSortDefault bool `xml:"nonAutoSortDefault,attr,omitempty"`
RankBy int `xml:"rankBy,attr,omitempty"`
- DefaultSubtotal *bool `xml:"defaultSubtotal,attr,omitempty"`
+ DefaultSubtotal *bool `xml:"defaultSubtotal,attr"`
SumSubtotal bool `xml:"sumSubtotal,attr,omitempty"`
CountASubtotal bool `xml:"countASubtotal,attr,omitempty"`
AvgSubtotal bool `xml:"avgSubtotal,attr,omitempty"`
@@ -273,7 +273,7 @@ type xlsxDataField struct {
ShowDataAs string `xml:"showDataAs,attr,omitempty"`
BaseField int `xml:"baseField,attr,omitempty"`
BaseItem int64 `xml:"baseItem,attr,omitempty"`
- NumFmtID string `xml:"numFmtId,attr,omitempty"`
+ NumFmtID int `xml:"numFmtId,attr,omitempty"`
ExtLst *xlsxExtLst `xml:"extLst"`
}
diff --git a/vendor/github.com/xuri/excelize/v2/xmlSlicers.go b/vendor/github.com/xuri/excelize/v2/xmlSlicers.go
index 6e688975..5c20923c 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlSlicers.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlSlicers.go
@@ -149,9 +149,10 @@ type xlsxX15SlicerCaches struct {
// decodeTableSlicerCache defines the structure used to parse the
// x15:tableSlicerCache element of the table slicer cache.
type decodeTableSlicerCache struct {
- XMLName xml.Name `xml:"tableSlicerCache"`
- TableID int `xml:"tableId,attr"`
- Column int `xml:"column,attr"`
+ XMLName xml.Name `xml:"tableSlicerCache"`
+ TableID int `xml:"tableId,attr"`
+ Column int `xml:"column,attr"`
+ SortOrder string `xml:"sortOrder,attr"`
}
// decodeSlicerList defines the structure used to parse the x14:slicerList
diff --git a/vendor/github.com/xuri/excelize/v2/xmlTheme.go b/vendor/github.com/xuri/excelize/v2/xmlTheme.go
index ec0c2bda..6bbabf68 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlTheme.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlTheme.go
@@ -148,7 +148,7 @@ type xlsxEffectStyleLst struct {
EffectStyleLst string `xml:",innerxml"`
}
-// xlsxBgFillStyleLst element defines a list of background fills that are
+// xlsxBgFillStyleLst element defines a list of background fills that are
// used within a theme. The background fills consist of three fills, arranged
// in order from subtle to moderate to intense.
type xlsxBgFillStyleLst struct {
diff --git a/vendor/github.com/xuri/excelize/v2/xmlWorksheet.go b/vendor/github.com/xuri/excelize/v2/xmlWorksheet.go
index 83e08054..43359d5d 100644
--- a/vendor/github.com/xuri/excelize/v2/xmlWorksheet.go
+++ b/vendor/github.com/xuri/excelize/v2/xmlWorksheet.go
@@ -308,7 +308,7 @@ type xlsxSheetData struct {
// particular row in the worksheet.
type xlsxRow struct {
C []xlsxC `xml:"c"`
- R *int `xml:"r,attr"`
+ R int `xml:"r,attr,omitempty"`
Spans string `xml:"spans,attr,omitempty"`
S int `xml:"s,attr,omitempty"`
CustomFormat bool `xml:"customFormat,attr,omitempty"`
@@ -441,6 +441,7 @@ type xlsxDataValidation struct {
ShowErrorMessage bool `xml:"showErrorMessage,attr,omitempty"`
ShowInputMessage bool `xml:"showInputMessage,attr,omitempty"`
Sqref string `xml:"sqref,attr"`
+ XMSqref string `xml:"sqref,omitempty"`
Type string `xml:"type,attr,omitempty"`
Formula1 *xlsxInnerXML `xml:"formula1"`
Formula2 *xlsxInnerXML `xml:"formula2"`
@@ -916,7 +917,7 @@ type ConditionalFormatOptions struct {
Type string
AboveAverage bool
Percent bool
- Format int
+ Format *int
Criteria string
Value string
MinType string
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 0fe9b3da..5ef87c83 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -10,7 +10,7 @@ github.com/richardlehane/msoleps/types
# github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d
## explicit; go 1.11
github.com/xuri/efp
-# github.com/xuri/excelize/v2 v2.8.1
+# github.com/xuri/excelize/v2 v2.9.0
## explicit; go 1.18
github.com/xuri/excelize/v2
# github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7