1. 09 1月, 2024 1 次提交
    • xurime's avatar
      This closes #1777, fix the GetStyle or GetConditionalStyle function to returns... · 79265655
      xurime 提交于
      This closes #1777, fix the GetStyle or GetConditionalStyle function to returns incorrect DecimalPlaces field value
      
      - Update documentation for the NewStyle function
      - Update unit tests
      - Update dependencies Go module
      - Update GitHub workflow dependencies package version
      - Update copyright agreement statement
      79265655
  2. 02 11月, 2023 1 次提交
  3. 31 10月, 2023 1 次提交
  4. 07 10月, 2023 1 次提交
  5. 06 10月, 2023 1 次提交
  6. 28 9月, 2023 1 次提交
  7. 21 9月, 2023 1 次提交
    • xurime's avatar
      This fix #1665, supports getting formula string cell value · 9c079e5e
      xurime 提交于
      - Improve compatibility for absolute path drawing part
      - Fix incorrect table ID generated in the workbook which contains single table cells
      - Fix missing relationship parts in the content types in some cases
      - Upgrade number format parser to fix missing literal tokens in some cases
      - Update built-in zh-cn and zh-tw language number format
      - Ref #65, init new formula function: TEXT
      - Remove duplicate style-related variables
      - Update the unit tests
      9c079e5e
  8. 16 9月, 2023 1 次提交
    • xurime's avatar
      Introduce the new exported function `AddSlicer` for adding table slicer · e3b7dad6
      xurime 提交于
      - Fix a v2.8.0 regression bug, generate workbook corruption caused by incorrect MRU colors style parts
      - Fix corrupted workbooks generated when adding tables in some cases
      - Added several exported extension list child element URI constants
      - Move part of the internal constant and variables definition to the template source code file
      - Updated unit tests
      e3b7dad6
  9. 09 9月, 2023 2 次提交
    • xurime's avatar
      This fixes #1645 and fixes #1655 · 49706c90
      xurime 提交于
      - Breaking changes, change the data type for the `HeaderFooterOptions` structure fields `AlignWithMargins` and `ScaleWithDoc` as a pointer
      - Fixed panic on `AutoFilter` by adding nil pointer guard for local sheet ID
      - Allow dot character in the defined name, table name, or pivot table name
      - Update the unit tests
      49706c90
    • M
      Fix bug in checkDefinedNames · a0a7d5cd
      Matthias Endler 提交于
      a0a7d5cd
  10. 08 9月, 2023 1 次提交
    • xurime's avatar
      This fixes #1643, fixes #1647 and fixes #1653 · ae64bcaa
      xurime 提交于
      - Correction cell type when formatting date type cell value
      - Add check for MID and MIDB formula functions num_chars arguments, prevent panic on specifying a negative number
      - Ref #65, add support for 2 formula functions: SEARCH and SEARCHB
      - Fix a v2.8.0 regression bug, error on set print area and print titles with built-in special defined name
      - Add new exported function `GetPivotTables` for get pivot tables
      - Add a new `Name` field in the `PivotTableOptions` to support specify pivot table name
      - Using relative cell reference in the pivot table docs and unit tests
      - Support adding slicer content type part internally
      - Add new exported source relationship and namespace `NameSpaceSpreadSheetXR10`, `ContentTypeSlicer`, `ContentTypeSlicerCache`, and `SourceRelationshipSlicer`
      - Add new exported extended URI `ExtURIPivotCacheDefinition`
      - Fix formula argument wildcard match issues
      - Update GitHub Actions configuration, test on Go 1.21.x with 1.21.1 and later
      - Avoid corrupted workbooks generated by improving compatibility with internally indexed color styles
      ae64bcaa
  11. 23 8月, 2023 1 次提交
  12. 08 6月, 2023 1 次提交
  13. 30 5月, 2023 1 次提交
  14. 22 5月, 2023 1 次提交
  15. 23 4月, 2023 1 次提交
  16. 21 4月, 2023 1 次提交
  17. 17 4月, 2023 1 次提交
    • xurime's avatar
      This commit contains 5 changes: · d0ad0f39
      xurime 提交于
      - Fix incorrect comment box size for multi-line plain text comments
      - Prevent create duplicate tables with the same name
      - Add new exported error variable `ErrExistsTableName`
      - Allocate buffer inside escape XML characters
      - Update the unit tests
      d0ad0f39
  18. 25 3月, 2023 1 次提交
    • xurime's avatar
      Breaking changes: changed the function signature for 4 exported functions · 60b9d029
      xurime 提交于
      - Change
          `func (f *File) AddVBAProject(bin string) error`
          to
          `func (f *File) AddVBAProject(file []byte) error`
      - Change
          `func (f *File) GetComments() (map[string][]Comment, error)`
          to
          `func (f *File) GetComments(sheet string) ([]Comment, error)`
      - Change
          `func (f *File) AddTable(sheet, rangeRef string, opts *TableOptions) error`
          to
          `func (f *File) AddTable(sheet string, table *Table) error`
      - Change
          `func (sw *StreamWriter) AddTable(rangeRef string, opts *TableOptions) error`
          to
          `func (sw *StreamWriter) AddTable(table *Table) error`
      - Rename exported data type `TableOptions` to `Table`
      - Simplify the assert statements in the unit tests
      - Update documents for the functions
      - Update unit tests
      60b9d029
  19. 04 3月, 2023 1 次提交
  20. 13 2月, 2023 1 次提交
  21. 02 1月, 2023 1 次提交
    • xurime's avatar
      This fixed worksheet protection issue · b39626fa
      xurime 提交于
      - Update example code in the documentation
      - Update unit tests
      - Rename `PictureOptions` to `GraphicOptions`
      - Adjust partial options fields data types for the `PictureOptions` and `Shape` structure
      - Update dependencies module
      b39626fa
  22. 30 12月, 2022 1 次提交
    • xurime's avatar
      Breaking change: changed the function signature for 11 exported functions · f58dabd4
      xurime 提交于
      * Change
          `func (f *File) NewConditionalStyle(style string) (int, error)`
          to
          `func (f *File) NewConditionalStyle(style *Style) (int, error)`
      * Change
          `func (f *File) NewStyle(style interface{}) (int, error)`
           to
          `func (f *File) NewStyle(style *Style) (int, error)`
      * Change
          `func (f *File) AddChart(sheet, cell, opts string, combo ...string) error`
           to
          `func (f *File) AddChart(sheet, cell string, chart *ChartOptions, combo ...*ChartOptions) error`
      * Change
          `func (f *File) AddChartSheet(sheet, opts string, combo ...string) error`
           to
          `func (f *File) AddChartSheet(sheet string, chart *ChartOptions, combo ...*ChartOptions) error`
      * Change
          `func (f *File) AddShape(sheet, cell, opts string) error`
           to
          `func (f *File) AddShape(sheet, cell string, opts *Shape) error`
      * Change
          `func (f *File) AddPictureFromBytes(sheet, cell, opts, name, extension string, file []byte) error`
           to
          `func (f *File) AddPictureFromBytes(sheet, cell, name, extension string, file []byte, opts *PictureOptions) error`
      * Change
          `func (f *File) AddTable(sheet, hCell, vCell, opts string) error`
           to
          `func (f *File) AddTable(sheet, reference string, opts *TableOptions) error`
      * Change
          `func (sw *StreamWriter) AddTable(hCell, vCell, opts string) error`
           to
          `func (sw *StreamWriter) AddTable(reference string, opts *TableOptions) error`
      * Change
          `func (f *File) AutoFilter(sheet, hCell, vCell, opts string) error`
           to
          `func (f *File) AutoFilter(sheet, reference string, opts *AutoFilterOptions) error`
      * Change
          `func (f *File) SetPanes(sheet, panes string) error`
           to
          `func (f *File) SetPanes(sheet string, panes *Panes) error`
      * Change
          `func (sw *StreamWriter) AddTable(hCell, vCell, opts string) error`
           to
          `func (sw *StreamWriter) AddTable(reference string, opts *TableOptions) error`
      * Change
          `func (f *File) SetConditionalFormat(sheet, reference, opts string) error`
           to
          `func (f *File) SetConditionalFormat(sheet, reference string, opts []ConditionalFormatOptions) error`
      * Add exported types:
        * AutoFilterListOptions
        * AutoFilterOptions
        * Chart
        * ChartAxis
        * ChartDimension
        * ChartLegend
        * ChartLine
        * ChartMarker
        * ChartPlotArea
        * ChartSeries
        * ChartTitle
        * ConditionalFormatOptions
        * PaneOptions
        * Panes
        * PictureOptions
        * Shape
        * ShapeColor
        * ShapeLine
        * ShapeParagraph
        * TableOptions
      * This added support for set sheet visible as very hidden
      * Return error when missing required parameters for set defined name
      * Update unit test and comments
      f58dabd4
  23. 23 12月, 2022 1 次提交
    • guoweikuang's avatar
      This closes #1425, breaking changes for sheet name (#1426) · 6a5ee811
      guoweikuang 提交于
      - Checking and return error for invalid sheet name instead of trim invalid characters
      - Add error return for the 4 functions: `DeleteSheet`, `GetSheetIndex`, `GetSheetVisible` and `SetSheetName`
      - Export new error 4 constants: `ErrSheetNameBlank`, `ErrSheetNameInvalid`, `ErrSheetNameLength` and `ErrSheetNameSingleQuote`
      - Rename exported error constant `ErrExistsWorksheet` to `ErrExistsSheet`
      - Update unit tests for 90 functions: `AddChart`,  `AddChartSheet`, `AddComment`, `AddDataValidation`, `AddPicture`, `AddPictureFromBytes`, `AddPivotTable`, `AddShape`, `AddSparkline`, `AddTable`, `AutoFilter`, `CalcCellValue`, `Cols`, `DeleteChart`, `DeleteComment`, `DeleteDataValidation`, `DeletePicture`, `DeleteSheet`, `DuplicateRow`, `DuplicateRowTo`, `GetCellFormula`, `GetCellHyperLink`, `GetCellRichText`, `GetCellStyle`, `GetCellType`, `GetCellValue`, `GetColOutlineLevel`, `GetCols`, `GetColStyle`, `GetColVisible`, `GetColWidth`, `GetConditionalFormats`, `GetDataValidations`, `GetMergeCells`, `GetPageLayout`, `GetPageMargins`, `GetPicture`, `GetRowHeight`, `GetRowOutlineLevel`, `GetRows`, `GetRowVisible`, `GetSheetIndex`, `GetSheetProps`, `GetSheetVisible`, `GroupSheets`, `InsertCol`, `InsertPageBreak`, `InsertRows`, `MergeCell`, `NewSheet`, `NewStreamWriter`, `ProtectSheet`, `RemoveCol`, `RemovePageBreak`, `RemoveRow`, `Rows`, `SearchSheet`, `SetCellBool`, `SetCellDefault`, `SetCellFloat`, `SetCellFormula`, `SetCellHyperLink`, `SetCellInt`, `SetCellRichText`, `SetCellStr`, `SetCellStyle`, `SetCellValue`, `SetColOutlineLevel`, `SetColStyle`, `SetColVisible`, `SetColWidth`, `SetConditionalFormat`, `SetHeaderFooter`, `SetPageLayout`, `SetPageMargins`, `SetPanes`, `SetRowHeight`, `SetRowOutlineLevel`, `SetRowStyle`, `SetRowVisible`, `SetSheetBackground`, `SetSheetBackgroundFromBytes`, `SetSheetCol`, `SetSheetName`, `SetSheetProps`, `SetSheetRow`, `SetSheetVisible`, `UnmergeCell`, `UnprotectSheet` and
      `UnsetConditionalFormat`
      - Update documentation of the set style functions
      Co-authored-by: Nguoweikuang <weikuang.guo@shopee.com>
      6a5ee811
  24. 13 11月, 2022 1 次提交
  25. 24 10月, 2022 1 次提交
    • xurime's avatar
      Support get cell value which contains a date in the ISO 8601 format · 14c6a198
      xurime 提交于
      - Support set and get font color with indexed color
      - New export variable `IndexedColorMapping`
      - Fix getting incorrect page margin settings when the margin is 0
      - Update unit tests and comments typo fixes
      - ref #65, new formula functions: AGGREGATE and SUBTOTAL
      14c6a198
  26. 14 10月, 2022 1 次提交
  27. 29 9月, 2022 1 次提交
    • xurime's avatar
      This closes #1358, made a refactor with breaking changes, see details: · 53a49556
      xurime 提交于
      This made a refactor with breaking changes:
      
      Motivation and Context
      
      When I decided to add set horizontal centered support for this library to resolve #1358, the reason I made this huge breaking change was:
      
      - There are too many exported types for set sheet view, properties, and format properties, although a function using the functional options pattern can be optimized by returning an anonymous function, these types or property set or get function has no binding categorization, so I change these functions like `SetAppProps` to accept a pointer of options structure.
      - Users can not easily find out which properties should be in the `SetSheetPrOptions` or `SetSheetFormatPr` categories
      - Nested properties cannot proceed modify easily
      
      Introduce 5 new export data types:
      `HeaderFooterOptions`, `PageLayoutMarginsOptions`, `PageLayoutOptions`, `SheetPropsOptions`, and `ViewOptions`
      
      Rename 4 exported data types:
      - Rename `PivotTableOption` to `PivotTableOptions`
      - Rename `FormatHeaderFooter` to `HeaderFooterOptions`
      - Rename `FormatSheetProtection` to `SheetProtectionOptions`
      - Rename `SparklineOption` to `SparklineOptions`
      
      Remove 54 exported types:
      `AutoPageBreaks`, `BaseColWidth`, `BlackAndWhite`, `CodeName`, `CustomHeight`, `Date1904`, `DefaultColWidth`, `DefaultGridColor`, `DefaultRowHeight`, `EnableFormatConditionsCalculation`, `FilterPrivacy`, `FirstPageNumber`, `FitToHeight`, `FitToPage`, `FitToWidth`, `OutlineSummaryBelow`, `PageLayoutOption`, `PageLayoutOptionPtr`, `PageLayoutOrientation`, `PageLayoutPaperSize`, `PageLayoutScale`, `PageMarginBottom`, `PageMarginFooter`, `PageMarginHeader`, `PageMarginLeft`, `PageMarginRight`, `PageMarginsOptions`, `PageMarginsOptionsPtr`, `PageMarginTop`, `Published`, `RightToLeft`, `SheetFormatPrOptions`, `SheetFormatPrOptionsPtr`, `SheetPrOption`, `SheetPrOptionPtr`, `SheetViewOption`, `SheetViewOptionPtr`, `ShowFormulas`, `ShowGridLines`, `ShowRowColHeaders`, `ShowRuler`, `ShowZeros`, `TabColorIndexed`, `TabColorRGB`, `TabColorTheme`, `TabColorTint`, `ThickBottom`, `ThickTop`, `TopLeftCell`, `View`, `WorkbookPrOption`, `WorkbookPrOptionPtr`, `ZeroHeight` and `ZoomScale`
      
      Remove 2 exported constants:
      `OrientationPortrait` and `OrientationLandscape`
      
      Change 8 functions:
      - Change the `func (f *File) SetPageLayout(sheet string, opts ...PageLayoutOption) error` to `func (f *File) SetPageLayout(sheet string, opts *PageLayoutOptions) error`
      - Change the `func (f *File) GetPageLayout(sheet string, opts ...PageLayoutOptionPtr) error` to `func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error)`
      - Change the `func (f *File) SetPageMargins(sheet string, opts ...PageMarginsOptions) error` to `func (f *File) SetPageMargins(sheet string, opts *PageLayoutMarginsOptions) error`
      - Change the `func (f *File) GetPageMargins(sheet string, opts ...PageMarginsOptionsPtr) error` to `func (f *File) GetPageMargins(sheet string) (PageLayoutMarginsOptions, error)`
      - Change the `func (f *File) SetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOption) error` to `func (f *File) SetSheetView(sheet string, viewIndex int, opts *ViewOptions) error`
      - Change the `func (f *File) GetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOptionPtr) error` to `func (f *File) GetSheetView(sheet string, viewIndex int) (ViewOptions, error)`
      - Change the `func (f *File) SetWorkbookPrOptions(opts ...WorkbookPrOption) error` to `func (f *File) SetWorkbookProps(opts *WorkbookPropsOptions) error`
      - Change the `func (f *File) GetWorkbookPrOptions(opts ...WorkbookPrOptionPtr) error` to `func (f *File) GetWorkbookProps() (WorkbookPropsOptions, error)`
      
      Introduce new function to instead of existing functions:
      - New function `func (f *File) SetSheetProps(sheet string, opts *SheetPropsOptions) error` instead of `func (f *File) SetSheetPrOptions(sheet string, opts ...SheetPrOption) error` and `func (f *File) SetSheetFormatPr(sheet string, opts ...SheetFormatPrOption
      53a49556
  28. 28 9月, 2022 1 次提交
    • xurime's avatar
      This closes #1360, closes #1361 · efcf599d
      xurime 提交于
      - Fix default number format parse issue with a long string of digits
      - Fix creating a sheet with an empty name cause a corrupted file
      - The `GetCellStyle` function no longer return master cell style of the merge cell range
      - Using the specialized name in variables and functions
      efcf599d
  29. 18 9月, 2022 1 次提交
  30. 13 8月, 2022 1 次提交
  31. 18 7月, 2022 1 次提交
  32. 16 7月, 2022 1 次提交
  33. 12 6月, 2022 1 次提交
  34. 16 4月, 2022 1 次提交
  35. 24 3月, 2022 1 次提交
  36. 17 2月, 2022 1 次提交
    • xurime's avatar
      This closes #1148, resolve limitations when adding VBA project to the workbook · f87c39c4
      xurime 提交于
      Added two exported functions `SetWorkbookPrOptions` and `GetWorkbookPrOptions` to support setting and getting the code name property of the workbook
      Re-order fields of the workbook properties group to improve the compatibility
      Go Modules dependencies upgrade
      Put workbook related operating in new `workbook.go` source code
      Library introduction docs block updated
      f87c39c4
  37. 16 1月, 2022 1 次提交
  38. 09 1月, 2022 1 次提交
  39. 17 11月, 2021 1 次提交