forked from p30928647/excelize
This closes #1523, preventing format text cell value as a numeric
- Simplify variable declaration and error return statements - Remove the internal `xlsxTabColor` data type - Using the `xlsxColor` data type instead of `xlsxTabColor` - Update unit test, improve code coverage
This commit is contained in:
parent
d0ad0f39ec
commit
fb6ce60bd5
4
calc.go
4
calc.go
|
@ -791,11 +791,11 @@ func (f *File) CalcCellValue(sheet, cell string, opts ...Options) (result string
|
|||
result = token.Value()
|
||||
if isNum, precision, decimal := isNumeric(result); isNum {
|
||||
if precision > 15 {
|
||||
result, err = f.formattedValue(styleIdx, strings.ToUpper(strconv.FormatFloat(decimal, 'G', 15, 64)), rawCellValue)
|
||||
result, err = f.formattedValue(&xlsxC{S: styleIdx, V: strings.ToUpper(strconv.FormatFloat(decimal, 'G', 15, 64))}, rawCellValue, CellTypeNumber)
|
||||
return
|
||||
}
|
||||
if !strings.HasPrefix(result, "0") {
|
||||
result, err = f.formattedValue(styleIdx, strings.ToUpper(strconv.FormatFloat(decimal, 'f', -1, 64)), rawCellValue)
|
||||
result, err = f.formattedValue(&xlsxC{S: styleIdx, V: strings.ToUpper(strconv.FormatFloat(decimal, 'f', -1, 64))}, rawCellValue, CellTypeNumber)
|
||||
}
|
||||
}
|
||||
return
|
||||
|
|
50
cell.go
50
cell.go
|
@ -516,7 +516,7 @@ func (c *xlsxC) getCellBool(f *File, raw bool) (string, error) {
|
|||
return "FALSE", nil
|
||||
}
|
||||
}
|
||||
return f.formattedValue(c.S, c.V, raw)
|
||||
return f.formattedValue(c, raw, CellTypeBool)
|
||||
}
|
||||
|
||||
// setCellDefault prepares cell type and string type cell value by a given
|
||||
|
@ -551,7 +551,7 @@ func (c *xlsxC) getCellDate(f *File, raw bool) (string, error) {
|
|||
c.V = strconv.FormatFloat(excelTime, 'G', 15, 64)
|
||||
}
|
||||
}
|
||||
return f.formattedValue(c.S, c.V, raw)
|
||||
return f.formattedValue(c, raw, CellTypeBool)
|
||||
}
|
||||
|
||||
// getValueFrom return a value from a column/row cell, this function is
|
||||
|
@ -567,21 +567,20 @@ func (c *xlsxC) getValueFrom(f *File, d *xlsxSST, raw bool) (string, error) {
|
|||
return c.getCellDate(f, raw)
|
||||
case "s":
|
||||
if c.V != "" {
|
||||
xlsxSI := 0
|
||||
xlsxSI, _ = strconv.Atoi(strings.TrimSpace(c.V))
|
||||
xlsxSI, _ := strconv.Atoi(strings.TrimSpace(c.V))
|
||||
if _, ok := f.tempFiles.Load(defaultXMLPathSharedStrings); ok {
|
||||
return f.formattedValue(c.S, f.getFromStringItem(xlsxSI), raw)
|
||||
return f.formattedValue(&xlsxC{S: c.S, V: f.getFromStringItem(xlsxSI)}, raw, CellTypeSharedString)
|
||||
}
|
||||
if len(d.SI) > xlsxSI {
|
||||
return f.formattedValue(c.S, d.SI[xlsxSI].String(), raw)
|
||||
return f.formattedValue(&xlsxC{S: c.S, V: d.SI[xlsxSI].String()}, raw, CellTypeSharedString)
|
||||
}
|
||||
}
|
||||
return f.formattedValue(c.S, c.V, raw)
|
||||
return f.formattedValue(c, raw, CellTypeSharedString)
|
||||
case "inlineStr":
|
||||
if c.IS != nil {
|
||||
return f.formattedValue(c.S, c.IS.String(), raw)
|
||||
return f.formattedValue(&xlsxC{S: c.S, V: c.IS.String()}, raw, CellTypeInlineString)
|
||||
}
|
||||
return f.formattedValue(c.S, c.V, raw)
|
||||
return f.formattedValue(c, raw, CellTypeInlineString)
|
||||
default:
|
||||
if isNum, precision, decimal := isNumeric(c.V); isNum && !raw {
|
||||
if precision > 15 {
|
||||
|
@ -590,7 +589,7 @@ func (c *xlsxC) getValueFrom(f *File, d *xlsxSST, raw bool) (string, error) {
|
|||
c.V = strconv.FormatFloat(decimal, 'f', -1, 64)
|
||||
}
|
||||
}
|
||||
return f.formattedValue(c.S, c.V, raw)
|
||||
return f.formattedValue(c, raw, CellTypeNumber)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1325,47 +1324,44 @@ func (f *File) getCellStringFunc(sheet, cell string, fn func(x *xlsxWorksheet, c
|
|||
// formattedValue provides a function to returns a value after formatted. If
|
||||
// it is possible to apply a format to the cell value, it will do so, if not
|
||||
// then an error will be returned, along with the raw value of the cell.
|
||||
func (f *File) formattedValue(s int, v string, raw bool) (string, error) {
|
||||
if raw {
|
||||
return v, nil
|
||||
}
|
||||
if s == 0 {
|
||||
return v, nil
|
||||
func (f *File) formattedValue(c *xlsxC, raw bool, cellType CellType) (string, error) {
|
||||
if raw || c.S == 0 {
|
||||
return c.V, nil
|
||||
}
|
||||
styleSheet, err := f.stylesReader()
|
||||
if err != nil {
|
||||
return v, err
|
||||
return c.V, err
|
||||
}
|
||||
if styleSheet.CellXfs == nil {
|
||||
return v, err
|
||||
return c.V, err
|
||||
}
|
||||
if s >= len(styleSheet.CellXfs.Xf) || s < 0 {
|
||||
return v, err
|
||||
if c.S >= len(styleSheet.CellXfs.Xf) || c.S < 0 {
|
||||
return c.V, err
|
||||
}
|
||||
var numFmtID int
|
||||
if styleSheet.CellXfs.Xf[s].NumFmtID != nil {
|
||||
numFmtID = *styleSheet.CellXfs.Xf[s].NumFmtID
|
||||
if styleSheet.CellXfs.Xf[c.S].NumFmtID != nil {
|
||||
numFmtID = *styleSheet.CellXfs.Xf[c.S].NumFmtID
|
||||
}
|
||||
date1904 := false
|
||||
wb, err := f.workbookReader()
|
||||
if err != nil {
|
||||
return v, err
|
||||
return c.V, err
|
||||
}
|
||||
if wb != nil && wb.WorkbookPr != nil {
|
||||
date1904 = wb.WorkbookPr.Date1904
|
||||
}
|
||||
if ok := builtInNumFmtFunc[numFmtID]; ok != nil {
|
||||
return ok(v, builtInNumFmt[numFmtID], date1904), err
|
||||
return ok(c.V, builtInNumFmt[numFmtID], date1904, cellType), err
|
||||
}
|
||||
if styleSheet.NumFmts == nil {
|
||||
return v, err
|
||||
return c.V, err
|
||||
}
|
||||
for _, xlsxFmt := range styleSheet.NumFmts.NumFmt {
|
||||
if xlsxFmt.NumFmtID == numFmtID {
|
||||
return format(v, xlsxFmt.FormatCode, date1904), err
|
||||
return format(c.V, xlsxFmt.FormatCode, date1904, cellType), err
|
||||
}
|
||||
}
|
||||
return v, err
|
||||
return c.V, err
|
||||
}
|
||||
|
||||
// prepareCellStyle provides a function to prepare style index of cell in
|
||||
|
|
45
cell_test.go
45
cell_test.go
|
@ -803,21 +803,21 @@ func TestSetCellRichText(t *testing.T) {
|
|||
|
||||
func TestFormattedValue(t *testing.T) {
|
||||
f := NewFile()
|
||||
result, err := f.formattedValue(0, "43528", false)
|
||||
result, err := f.formattedValue(&xlsxC{S: 0, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
// S is too large
|
||||
result, err = f.formattedValue(15, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 15, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
// S is too small
|
||||
result, err = f.formattedValue(-15, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: -15, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
result, err = f.formattedValue(1, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 1, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
customNumFmt := "[$-409]MM/DD/YYYY"
|
||||
|
@ -825,7 +825,7 @@ func TestFormattedValue(t *testing.T) {
|
|||
CustomNumFmt: &customNumFmt,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
result, err = f.formattedValue(1, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 1, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "03/04/2019", result)
|
||||
|
||||
|
@ -834,7 +834,7 @@ func TestFormattedValue(t *testing.T) {
|
|||
f.Styles.CellXfs.Xf = append(f.Styles.CellXfs.Xf, xlsxXf{
|
||||
NumFmtID: &numFmtID,
|
||||
})
|
||||
result, err = f.formattedValue(2, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 2, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
|
@ -842,7 +842,7 @@ func TestFormattedValue(t *testing.T) {
|
|||
f.Styles.CellXfs.Xf = append(f.Styles.CellXfs.Xf, xlsxXf{
|
||||
NumFmtID: nil,
|
||||
})
|
||||
result, err = f.formattedValue(3, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 3, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
|
@ -851,7 +851,16 @@ func TestFormattedValue(t *testing.T) {
|
|||
f.Styles.CellXfs.Xf = append(f.Styles.CellXfs.Xf, xlsxXf{
|
||||
NumFmtID: &numFmtID,
|
||||
})
|
||||
result, err = f.formattedValue(1, "43528", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: 1, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
// Test format numeric value with shared string data type
|
||||
f.Styles.NumFmts, numFmtID = nil, 11
|
||||
f.Styles.CellXfs.Xf = append(f.Styles.CellXfs.Xf, xlsxXf{
|
||||
NumFmtID: &numFmtID,
|
||||
})
|
||||
result, err = f.formattedValue(&xlsxC{S: 5, V: "43528"}, false, CellTypeSharedString)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
|
||||
|
@ -860,32 +869,36 @@ func TestFormattedValue(t *testing.T) {
|
|||
NumFmt: 1,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
result, err = f.formattedValue(styleID, "310.56", false)
|
||||
result, err = f.formattedValue(&xlsxC{S: styleID, V: "310.56"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "311", result)
|
||||
|
||||
for _, fn := range builtInNumFmtFunc {
|
||||
assert.Equal(t, "0_0", fn("0_0", "", false))
|
||||
assert.Equal(t, "0_0", fn("0_0", "", false, CellTypeNumber))
|
||||
}
|
||||
|
||||
// Test format value with unsupported charset workbook
|
||||
f.WorkBook = nil
|
||||
f.Pkg.Store(defaultXMLPathWorkbook, MacintoshCyrillicCharset)
|
||||
_, err = f.formattedValue(1, "43528", false)
|
||||
_, err = f.formattedValue(&xlsxC{S: 1, V: "43528"}, false, CellTypeNumber)
|
||||
assert.EqualError(t, err, "XML syntax error on line 1: invalid UTF-8")
|
||||
|
||||
// Test format value with unsupported charset style sheet
|
||||
f.Styles = nil
|
||||
f.Pkg.Store(defaultXMLPathStyles, MacintoshCyrillicCharset)
|
||||
_, err = f.formattedValue(1, "43528", false)
|
||||
_, err = f.formattedValue(&xlsxC{S: 1, V: "43528"}, false, CellTypeNumber)
|
||||
assert.EqualError(t, err, "XML syntax error on line 1: invalid UTF-8")
|
||||
|
||||
for _, fn := range builtInNumFmtFunc {
|
||||
assert.Equal(t, fn("text", "0", false, CellTypeNumber), "text")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFormattedValueNilXfs(t *testing.T) {
|
||||
// Set the CellXfs to nil and verify that the formattedValue function does not crash
|
||||
f := NewFile()
|
||||
f.Styles.CellXfs = nil
|
||||
result, err := f.formattedValue(3, "43528", false)
|
||||
result, err := f.formattedValue(&xlsxC{S: 3, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
}
|
||||
|
@ -894,7 +907,7 @@ func TestFormattedValueNilNumFmts(t *testing.T) {
|
|||
// Set the NumFmts value to nil and verify that the formattedValue function does not crash
|
||||
f := NewFile()
|
||||
f.Styles.NumFmts = nil
|
||||
result, err := f.formattedValue(3, "43528", false)
|
||||
result, err := f.formattedValue(&xlsxC{S: 3, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
}
|
||||
|
@ -903,7 +916,7 @@ func TestFormattedValueNilWorkbook(t *testing.T) {
|
|||
// Set the Workbook value to nil and verify that the formattedValue function does not crash
|
||||
f := NewFile()
|
||||
f.WorkBook = nil
|
||||
result, err := f.formattedValue(3, "43528", false)
|
||||
result, err := f.formattedValue(&xlsxC{S: 3, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
}
|
||||
|
@ -913,7 +926,7 @@ func TestFormattedValueNilWorkbookPr(t *testing.T) {
|
|||
// crash.
|
||||
f := NewFile()
|
||||
f.WorkBook.WorkbookPr = nil
|
||||
result, err := f.formattedValue(3, "43528", false)
|
||||
result, err := f.formattedValue(&xlsxC{S: 3, V: "43528"}, false, CellTypeNumber)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "43528", result)
|
||||
}
|
||||
|
|
|
@ -121,6 +121,12 @@ func TestDeleteDrawing(t *testing.T) {
|
|||
path := "xl/drawings/drawing1.xml"
|
||||
f.Pkg.Store(path, MacintoshCyrillicCharset)
|
||||
assert.EqualError(t, f.deleteDrawing(0, 0, path, "Chart"), "XML syntax error on line 1: invalid UTF-8")
|
||||
f, err := OpenFile(filepath.Join("test", "Book1.xlsx"))
|
||||
assert.NoError(t, err)
|
||||
f.Drawings.Store(path, &xlsxWsDr{TwoCellAnchor: []*xdrCellAnchor{{
|
||||
GraphicFrame: string(MacintoshCyrillicCharset),
|
||||
}}})
|
||||
assert.EqualError(t, f.deleteDrawing(0, 0, path, "Chart"), "XML syntax error on line 1: invalid UTF-8")
|
||||
}
|
||||
|
||||
func TestAddChart(t *testing.T) {
|
||||
|
|
|
@ -12,11 +12,14 @@
|
|||
package excelize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/richardlehane/mscfb"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -51,6 +54,25 @@ func TestEncrypt(t *testing.T) {
|
|||
// Test remove password by save workbook with options
|
||||
assert.NoError(t, f.Save(Options{Password: ""}))
|
||||
assert.NoError(t, f.Close())
|
||||
|
||||
doc, err := mscfb.New(bytes.NewReader(raw))
|
||||
assert.NoError(t, err)
|
||||
encryptionInfoBuf, encryptedPackageBuf := extractPart(doc)
|
||||
binary.LittleEndian.PutUint64(encryptionInfoBuf[20:32], uint64(0))
|
||||
_, err = standardDecrypt(encryptionInfoBuf, encryptedPackageBuf, &Options{Password: "password"})
|
||||
assert.NoError(t, err)
|
||||
_, err = decrypt(nil, nil, nil)
|
||||
assert.EqualError(t, err, "crypto/aes: invalid key size 0")
|
||||
_, err = agileDecrypt(encryptionInfoBuf, MacintoshCyrillicCharset, &Options{Password: "password"})
|
||||
assert.EqualError(t, err, "XML syntax error on line 1: invalid character entity &0 (no semicolon)")
|
||||
_, err = convertPasswdToKey("password", nil, Encryption{
|
||||
KeyEncryptors: KeyEncryptors{KeyEncryptor: []KeyEncryptor{
|
||||
{EncryptedKey: EncryptedKey{KeyData: KeyData{SaltValue: "=="}}},
|
||||
}},
|
||||
})
|
||||
assert.EqualError(t, err, "illegal base64 data at input byte 0")
|
||||
_, err = createIV([]byte{0}, Encryption{KeyData: KeyData{SaltValue: "=="}})
|
||||
assert.EqualError(t, err, "illegal base64 data at input byte 0")
|
||||
}
|
||||
|
||||
func TestEncryptionMechanism(t *testing.T) {
|
||||
|
|
|
@ -101,11 +101,10 @@ func OpenFile(filename string, opts ...Options) (*File, error) {
|
|||
}
|
||||
f, err := OpenReader(file, opts...)
|
||||
if err != nil {
|
||||
closeErr := file.Close()
|
||||
if closeErr == nil {
|
||||
return f, err
|
||||
if closeErr := file.Close(); closeErr != nil {
|
||||
return f, closeErr
|
||||
}
|
||||
return f, closeErr
|
||||
return f, err
|
||||
}
|
||||
f.Path = filename
|
||||
return f, file.Close()
|
||||
|
|
10
numfmt.go
10
numfmt.go
|
@ -31,6 +31,7 @@ type languageInfo struct {
|
|||
// numberFormat directly maps the number format parser runtime required
|
||||
// fields.
|
||||
type numberFormat struct {
|
||||
cellType CellType
|
||||
section []nfp.Section
|
||||
t time.Time
|
||||
sectionIdx int
|
||||
|
@ -336,6 +337,9 @@ var (
|
|||
// prepareNumberic split the number into two before and after parts by a
|
||||
// decimal point.
|
||||
func (nf *numberFormat) prepareNumberic(value string) {
|
||||
if nf.cellType != CellTypeNumber && nf.cellType != CellTypeDate {
|
||||
return
|
||||
}
|
||||
if nf.isNumeric, _, _ = isNumeric(value); !nf.isNumeric {
|
||||
return
|
||||
}
|
||||
|
@ -344,9 +348,9 @@ func (nf *numberFormat) prepareNumberic(value string) {
|
|||
// format provides a function to return a string parse by number format
|
||||
// expression. If the given number format is not supported, this will return
|
||||
// the original cell value.
|
||||
func format(value, numFmt string, date1904 bool) string {
|
||||
func format(value, numFmt string, date1904 bool, cellType CellType) string {
|
||||
p := nfp.NumberFormatParser()
|
||||
nf := numberFormat{section: p.Parse(numFmt), value: value, date1904: date1904}
|
||||
nf := numberFormat{section: p.Parse(numFmt), value: value, date1904: date1904, cellType: cellType}
|
||||
nf.number, nf.valueSectionType = nf.getValueSectionType(value)
|
||||
nf.prepareNumberic(value)
|
||||
for i, section := range nf.section {
|
||||
|
@ -947,7 +951,7 @@ func (nf *numberFormat) textHandler() (result string) {
|
|||
if token.TType == nfp.TokenTypeLiteral {
|
||||
result += token.TValue
|
||||
}
|
||||
if token.TType == nfp.TokenTypeTextPlaceHolder {
|
||||
if token.TType == nfp.TokenTypeTextPlaceHolder || token.TType == nfp.TokenTypeZeroPlaceHolder {
|
||||
result += nf.value
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1005,7 +1005,7 @@ func TestNumFmt(t *testing.T) {
|
|||
{"-8.0450685976001E-21", "0_);[Red]\\(0\\)", "(0)"},
|
||||
{"-8.04506", "0_);[Red]\\(0\\)", "(8)"},
|
||||
} {
|
||||
result := format(item[0], item[1], false)
|
||||
result := format(item[0], item[1], false, CellTypeNumber)
|
||||
assert.Equal(t, item[2], result, item)
|
||||
}
|
||||
}
|
||||
|
|
10
rows_test.go
10
rows_test.go
|
@ -11,6 +11,16 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGetRows(t *testing.T) {
|
||||
f := NewFile()
|
||||
assert.NoError(t, f.SetCellValue("Sheet1", "A1", "A1"))
|
||||
// Test get rows with unsupported charset shared strings table
|
||||
f.SharedStrings = nil
|
||||
f.Pkg.Store(defaultXMLPathSharedStrings, MacintoshCyrillicCharset)
|
||||
_, err := f.GetRows("Sheet1")
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestRows(t *testing.T) {
|
||||
const sheet2 = "Sheet2"
|
||||
f, err := OpenFile(filepath.Join("test", "Book1.xlsx"))
|
||||
|
|
11
sheetpr.go
11
sheetpr.go
|
@ -116,7 +116,7 @@ func (ws *xlsxWorksheet) setSheetProps(opts *SheetPropsOptions) {
|
|||
prepareTabColor := func(ws *xlsxWorksheet) {
|
||||
ws.prepareSheetPr()
|
||||
if ws.SheetPr.TabColor == nil {
|
||||
ws.SheetPr.TabColor = new(xlsxTabColor)
|
||||
ws.SheetPr.TabColor = new(xlsxColor)
|
||||
}
|
||||
}
|
||||
if opts.CodeName != nil {
|
||||
|
@ -145,7 +145,12 @@ func (ws *xlsxWorksheet) setSheetProps(opts *SheetPropsOptions) {
|
|||
if !s.Field(i).IsNil() {
|
||||
prepareTabColor(ws)
|
||||
name := s.Type().Field(i).Name
|
||||
reflect.ValueOf(ws.SheetPr.TabColor).Elem().FieldByName(name[8:]).Set(s.Field(i).Elem())
|
||||
fld := reflect.ValueOf(ws.SheetPr.TabColor).Elem().FieldByName(name[8:])
|
||||
if s.Field(i).Kind() == reflect.Ptr && fld.Kind() == reflect.Ptr {
|
||||
fld.Set(s.Field(i))
|
||||
continue
|
||||
}
|
||||
fld.Set(s.Field(i).Elem())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +211,7 @@ func (f *File) GetSheetProps(sheet string) (SheetPropsOptions, error) {
|
|||
if ws.SheetPr.TabColor != nil {
|
||||
opts.TabColorIndexed = intPtr(ws.SheetPr.TabColor.Indexed)
|
||||
opts.TabColorRGB = stringPtr(ws.SheetPr.TabColor.RGB)
|
||||
opts.TabColorTheme = intPtr(ws.SheetPr.TabColor.Theme)
|
||||
opts.TabColorTheme = ws.SheetPr.TabColor.Theme
|
||||
opts.TabColorTint = float64Ptr(ws.SheetPr.TabColor.Tint)
|
||||
}
|
||||
}
|
||||
|
|
520
sparkline.go
520
sparkline.go
|
@ -23,337 +23,337 @@ import (
|
|||
func (f *File) addSparklineGroupByStyle(ID int) *xlsxX14SparklineGroup {
|
||||
groups := []*xlsxX14SparklineGroup{
|
||||
{
|
||||
ColorSeries: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 5},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 4, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 4},
|
||||
ColorLow: &xlsxTabColor{Theme: 4},
|
||||
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: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 5},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 4, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 4},
|
||||
ColorLow: &xlsxTabColor{Theme: 4},
|
||||
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: &xlsxTabColor{Theme: 5, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 6},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 5, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 5, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 5, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 5},
|
||||
ColorLow: &xlsxTabColor{Theme: 5},
|
||||
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: &xlsxTabColor{Theme: 6, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 7},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 6, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 6, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 6, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6},
|
||||
ColorLow: &xlsxTabColor{Theme: 6},
|
||||
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: &xlsxTabColor{Theme: 7, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 8},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 7, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 7, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 7, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 7},
|
||||
ColorLow: &xlsxTabColor{Theme: 7},
|
||||
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: &xlsxTabColor{Theme: 8, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 9},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 8, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 8, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 8},
|
||||
ColorLow: &xlsxTabColor{Theme: 8},
|
||||
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: &xlsxTabColor{Theme: 9, Tint: -0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 4},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 9, Tint: -0.499984740745262},
|
||||
ColorFirst: &xlsxTabColor{Theme: 9, Tint: 0.39997558519241921},
|
||||
ColorLast: &xlsxTabColor{Theme: 9, Tint: 0.39997558519241921},
|
||||
ColorHigh: &xlsxTabColor{Theme: 9},
|
||||
ColorLow: &xlsxTabColor{Theme: 9},
|
||||
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: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 5},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 5},
|
||||
ColorLow: &xlsxTabColor{Theme: 5},
|
||||
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: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 6},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 7},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 8},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 9},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorNegative: &xlsxTabColor{Theme: 4},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 4},
|
||||
ColorNegative: &xlsxTabColor{Theme: 5},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 5},
|
||||
ColorNegative: &xlsxTabColor{Theme: 6},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 6},
|
||||
ColorNegative: &xlsxTabColor{Theme: 7},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 7},
|
||||
ColorNegative: &xlsxTabColor{Theme: 8},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 8},
|
||||
ColorNegative: &xlsxTabColor{Theme: 9},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 9},
|
||||
ColorNegative: &xlsxTabColor{Theme: 4},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 4, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 4, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 4, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 4, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 5, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 5, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 5, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 5, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 5, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 6, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 6, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 6, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 6, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 7, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 7, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 7, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 7, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 7, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 8, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 8, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 8, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 8, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 9, Tint: 0.39997558519241921},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: -0.499984740745262},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 9, Tint: 0.79998168889431442},
|
||||
ColorFirst: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 9, Tint: -0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 9, Tint: -0.499984740745262},
|
||||
ColorLow: &xlsxTabColor{Theme: 9, Tint: -0.499984740745262},
|
||||
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: &xlsxTabColor{Theme: 1, Tint: 0.499984740745262},
|
||||
ColorNegative: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 1, Tint: 0.249977111117893},
|
||||
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: &xlsxTabColor{Theme: 1, Tint: 0.34998626667073579},
|
||||
ColorNegative: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
ColorFirst: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
ColorLast: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
ColorHigh: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
ColorLow: &xlsxTabColor{Theme: 0, Tint: 0.249977111117893},
|
||||
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: &xlsxTabColor{RGB: "FF323232"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFD00000"},
|
||||
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: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
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: &xlsxTabColor{RGB: "FF376092"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FFD00000"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFD00000"},
|
||||
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: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF000000"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FF000000"},
|
||||
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: &xlsxTabColor{RGB: "FF5F5F5F"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFFFB620"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FFD70077"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FF5687C2"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FF359CEB"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF56BE79"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFFF5055"},
|
||||
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: &xlsxTabColor{RGB: "FF5687C2"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFFFB620"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FFD70077"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FF777777"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FF359CEB"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF56BE79"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFFF5055"},
|
||||
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: &xlsxTabColor{RGB: "FFC6EFCE"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFFFC7CE"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FF8CADD6"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FFFFDC47"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FFFFEB9C"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF60D276"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFFF5367"},
|
||||
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: &xlsxTabColor{RGB: "FF00B050"},
|
||||
ColorNegative: &xlsxTabColor{RGB: "FFFF0000"},
|
||||
ColorMarkers: &xlsxTabColor{RGB: "FF0070C0"},
|
||||
ColorFirst: &xlsxTabColor{RGB: "FFFFC000"},
|
||||
ColorLast: &xlsxTabColor{RGB: "FFFFC000"},
|
||||
ColorHigh: &xlsxTabColor{RGB: "FF00B050"},
|
||||
ColorLow: &xlsxTabColor{RGB: "FFFF0000"},
|
||||
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: &xlsxTabColor{Theme: 3},
|
||||
ColorNegative: &xlsxTabColor{Theme: 9},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4},
|
||||
ColorLast: &xlsxTabColor{Theme: 5},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6},
|
||||
ColorLow: &xlsxTabColor{Theme: 7},
|
||||
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: &xlsxTabColor{Theme: 1},
|
||||
ColorNegative: &xlsxTabColor{Theme: 9},
|
||||
ColorMarkers: &xlsxTabColor{Theme: 8},
|
||||
ColorFirst: &xlsxTabColor{Theme: 4},
|
||||
ColorLast: &xlsxTabColor{Theme: 5},
|
||||
ColorHigh: &xlsxTabColor{Theme: 6},
|
||||
ColorLow: &xlsxTabColor{Theme: 7},
|
||||
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
|
||||
}
|
||||
return groups[ID]
|
||||
|
@ -427,7 +427,7 @@ func (f *File) AddSparkline(sheet string, opts *SparklineOptions) error {
|
|||
group.DisplayXAxis = opts.Axis
|
||||
group.Markers = opts.Markers
|
||||
if opts.SeriesColor != "" {
|
||||
group.ColorSeries = &xlsxTabColor{
|
||||
group.ColorSeries = &xlsxColor{
|
||||
RGB: getPaletteColor(opts.SeriesColor),
|
||||
}
|
||||
}
|
||||
|
|
34
styles.go
34
styles.go
|
@ -753,7 +753,7 @@ var currencyNumFmt = map[int]string{
|
|||
|
||||
// builtInNumFmtFunc defined the format conversion functions map. Partial format
|
||||
// code doesn't support currently and will return original string.
|
||||
var builtInNumFmtFunc = map[int]func(v, format string, date1904 bool) string{
|
||||
var builtInNumFmtFunc = map[int]func(v, format string, date1904 bool, cellType CellType) string{
|
||||
0: format,
|
||||
1: formatToInt,
|
||||
2: formatToFloat,
|
||||
|
@ -892,8 +892,8 @@ func printCommaSep(text string) string {
|
|||
// formatToInt provides a function to convert original string to integer
|
||||
// format as string type by given built-in number formats code and cell
|
||||
// string.
|
||||
func formatToInt(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToInt(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -906,8 +906,8 @@ func formatToInt(v, format string, date1904 bool) string {
|
|||
// formatToFloat provides a function to convert original string to float
|
||||
// format as string type by given built-in number formats code and cell
|
||||
// string.
|
||||
func formatToFloat(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToFloat(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -924,8 +924,8 @@ func formatToFloat(v, format string, date1904 bool) string {
|
|||
// formatToIntSeparator provides a function to convert original string to
|
||||
// integer format as string type by given built-in number formats code and cell
|
||||
// string.
|
||||
func formatToIntSeparator(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToIntSeparator(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -937,8 +937,8 @@ func formatToIntSeparator(v, format string, date1904 bool) string {
|
|||
|
||||
// formatToA provides a function to convert original string to special format
|
||||
// as string type by given built-in number formats code and cell string.
|
||||
func formatToA(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToA(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -960,8 +960,8 @@ func formatToA(v, format string, date1904 bool) string {
|
|||
|
||||
// formatToB provides a function to convert original string to special format
|
||||
// as string type by given built-in number formats code and cell string.
|
||||
func formatToB(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToB(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -990,8 +990,8 @@ func formatToB(v, format string, date1904 bool) string {
|
|||
|
||||
// formatToC provides a function to convert original string to special format
|
||||
// as string type by given built-in number formats code and cell string.
|
||||
func formatToC(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToC(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -1007,8 +1007,8 @@ func formatToC(v, format string, date1904 bool) string {
|
|||
|
||||
// formatToD provides a function to convert original string to special format
|
||||
// as string type by given built-in number formats code and cell string.
|
||||
func formatToD(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToD(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
@ -1024,8 +1024,8 @@ func formatToD(v, format string, date1904 bool) string {
|
|||
|
||||
// formatToE provides a function to convert original string to special format
|
||||
// as string type by given built-in number formats code and cell string.
|
||||
func formatToE(v, format string, date1904 bool) string {
|
||||
if strings.Contains(v, "_") {
|
||||
func formatToE(v, format string, date1904 bool, cellType CellType) string {
|
||||
if strings.Contains(v, "_") || cellType == CellTypeSharedString || cellType == CellTypeInlineString {
|
||||
return v
|
||||
}
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
|
|
|
@ -35,10 +35,10 @@ type xlsxChartsheet struct {
|
|||
|
||||
// xlsxChartsheetPr specifies chart sheet properties.
|
||||
type xlsxChartsheetPr struct {
|
||||
XMLName xml.Name `xml:"sheetPr"`
|
||||
PublishedAttr bool `xml:"published,attr,omitempty"`
|
||||
CodeNameAttr string `xml:"codeName,attr,omitempty"`
|
||||
TabColor *xlsxTabColor `xml:"tabColor"`
|
||||
XMLName xml.Name `xml:"sheetPr"`
|
||||
PublishedAttr bool `xml:"published,attr,omitempty"`
|
||||
CodeNameAttr string `xml:"codeName,attr,omitempty"`
|
||||
TabColor *xlsxColor `xml:"tabColor"`
|
||||
}
|
||||
|
||||
// xlsxChartsheetViews specifies chart sheet views.
|
||||
|
|
|
@ -241,7 +241,7 @@ type xlsxSheetPr struct {
|
|||
CodeName string `xml:"codeName,attr,omitempty"`
|
||||
FilterMode bool `xml:"filterMode,attr,omitempty"`
|
||||
EnableFormatConditionsCalculation *bool `xml:"enableFormatConditionsCalculation,attr"`
|
||||
TabColor *xlsxTabColor `xml:"tabColor"`
|
||||
TabColor *xlsxColor `xml:"tabColor"`
|
||||
OutlinePr *xlsxOutlinePr `xml:"outlinePr"`
|
||||
PageSetUpPr *xlsxPageSetUpPr `xml:"pageSetUpPr"`
|
||||
}
|
||||
|
@ -261,15 +261,6 @@ type xlsxPageSetUpPr struct {
|
|||
FitToPage bool `xml:"fitToPage,attr,omitempty"`
|
||||
}
|
||||
|
||||
// xlsxTabColor represents background color of the sheet tab.
|
||||
type xlsxTabColor struct {
|
||||
Auto bool `xml:"auto,attr,omitempty"`
|
||||
Indexed int `xml:"indexed,attr,omitempty"`
|
||||
RGB string `xml:"rgb,attr,omitempty"`
|
||||
Theme int `xml:"theme,attr,omitempty"`
|
||||
Tint float64 `xml:"tint,attr,omitempty"`
|
||||
}
|
||||
|
||||
// xlsxCols defines column width and column formatting for one or more columns
|
||||
// of the worksheet.
|
||||
type xlsxCols struct {
|
||||
|
@ -850,14 +841,14 @@ type xlsxX14SparklineGroup struct {
|
|||
MinAxisType string `xml:"minAxisType,attr,omitempty"`
|
||||
MaxAxisType string `xml:"maxAxisType,attr,omitempty"`
|
||||
RightToLeft bool `xml:"rightToLeft,attr,omitempty"`
|
||||
ColorSeries *xlsxTabColor `xml:"x14:colorSeries"`
|
||||
ColorNegative *xlsxTabColor `xml:"x14:colorNegative"`
|
||||
ColorSeries *xlsxColor `xml:"x14:colorSeries"`
|
||||
ColorNegative *xlsxColor `xml:"x14:colorNegative"`
|
||||
ColorAxis *xlsxColor `xml:"x14:colorAxis"`
|
||||
ColorMarkers *xlsxTabColor `xml:"x14:colorMarkers"`
|
||||
ColorFirst *xlsxTabColor `xml:"x14:colorFirst"`
|
||||
ColorLast *xlsxTabColor `xml:"x14:colorLast"`
|
||||
ColorHigh *xlsxTabColor `xml:"x14:colorHigh"`
|
||||
ColorLow *xlsxTabColor `xml:"x14:colorLow"`
|
||||
ColorMarkers *xlsxColor `xml:"x14:colorMarkers"`
|
||||
ColorFirst *xlsxColor `xml:"x14:colorFirst"`
|
||||
ColorLast *xlsxColor `xml:"x14:colorLast"`
|
||||
ColorHigh *xlsxColor `xml:"x14:colorHigh"`
|
||||
ColorLow *xlsxColor `xml:"x14:colorLow"`
|
||||
Sparklines xlsxX14Sparklines `xml:"x14:sparklines"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue