Commit Graph

60 Commits

Author SHA1 Message Date
3zmx 50e23df865
ref #65, support _xlfn.ANCHORARRAY formula function (#1784)
- Initial formula array calculation support
- Update unit test and documentation
2024-01-18 15:31:43 +08:00
xuri 792656552b
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
2024-01-09 20:56:20 +08:00
xuri 1c7c417c70
This closes #1677, fix the incorrect custom number format ID allocated
- Improve compatibility with empty custom number format code
2023-10-02 00:06:38 +08:00
xuri e3b7dad69a
Introduce the new exported function `AddSlicer` for adding table slicer
- 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
2023-09-16 12:21:11 +08:00
xuri ae64bcaabe
This fixes #1643, fixes #1647 and fixes #1653
- 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
2023-09-08 00:21:38 +08:00
cnmlgbgithub db22452398
This closes #314, closes #1520 and closes #1521 (#1574)
- Add new function GetStyle support for get style definition
2023-08-24 23:51:07 +08:00
xuri c63ae6d262
This fixed #1610, support to create a conditional format with number format and protection 2023-08-17 11:34:28 +08:00
xuri 5fe30eb456
This closes #1590, add the Japanese calendar number format support
- The `GetFormControl` now support to get text, rich-text and font format of the form controls
- Update the unit tests and the documentation
2023-07-31 00:08:10 +08:00
xuri 8418bd7afd
This closes #1572
- Breaking changes: changed the data type for the `DecimalPlaces` to pointer of integer
- Fallback to default 2 zero placeholder for invalid decimal places
- Update unit tests
2023-07-08 18:36:35 +08:00
xuri 121ac17ca0
This fixed incorrect formula calculation exception expected result
- Simplify and remove duplicate code for optimization
- Update documentation comments with typo fix
- Handle error return to save the workbook
- Add file path length limitation details in the error message
2023-05-30 00:19:12 +08:00
xuri 49234fb95e
Ref #1199, this support applies partial built-in language number format code
- Remove the `Lang` field in the `Style` data type
- Rename field name `ShortDateFmtCode` to `ShortDatePattern` in the `Options` data type
- Rename field name `LongDateFmtCode` to `LongDatePattern` in the `Options` data type
- Rename field name `LongTimeFmtCode` to `LongTimePattern` in the `Options` data type
- Apply built-in language number format code number when creating a new style
- Checking and returning error if the date and time pattern was invalid
- Add new `Options` field `CultureInfo` and new exported data type `CultureName`
- Add new culture name types enumeration for country code
- Update unit tests
- Move built-in number format code and currency number format code definition source code
- Remove the built-in language number format code mapping with Unicode values
- Fix incorrect number formatted result for date and time with 12 hours at AM
2023-05-11 09:08:38 +08:00
xuri 93c72b4d55
This optimizes internal functions signature and mutex declarations 2023-04-24 00:02:13 +08:00
xuri b39626fae9
This fixed worksheet protection issue
- 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
2023-01-02 11:47:31 +08:00
xuri f58dabd492
Breaking change: changed the function signature for 11 exported functions
* 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
2022-12-30 00:50:08 +08:00
xuri 14c6a198ce
Support get cell value which contains a date in the ISO 8601 format
- 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
2022-10-24 00:52:09 +08:00
GaoFei 3ece904b00
This closes #1369, support set, and get font color with theme and tint (#1370) 2022-10-15 00:03:49 +08:00
jialei d490a0f86f
RichTextRun support set superscript and subscript by vertAlign attribute (#1252)
check vertical align enumeration, update set rich text docs and test
2022-06-13 23:38:59 +08:00
xuri 8a335225c7
Format code, update documentation and remove exported variable `XMLHeaderByte` 2022-03-24 00:19:30 +08:00
xuri f87c39c41d
This closes #1148, resolve limitations when adding VBA project to the workbook
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
2022-02-17 00:09:11 +08:00
xuri 236ee61d20
This closes #1119, style parsing issue fixed 2022-01-15 00:06:34 +08:00
xuri 2245fccca0
Typo fix, rename exported constants, dependencies modules and copyright update
Rename exported constants `NameSpaceDublinCoreMetadataIntiative` to `NameSpaceDublinCoreMetadataInitiative`
2022-01-09 00:20:42 +08:00
xuri 90d200a10b
Make the functions `SetSheetRow`, `New Style` and `SetCellStyle` concurrency safety 2021-07-07 00:57:43 +08:00
xuri 7e429c5b46
Fixe issue generated file corrupted caused by incorrect default XML namespace attributes 2021-04-30 00:14:42 +08:00
xuri f8f699a172
Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMEXP, IMLN and IMLOG10 2021-04-04 15:29:43 +08:00
xuri 2af96c0714
#65 fn: N, PERCENTILE.INC and T
typo fixed
2021-03-30 23:02:22 +08:00
xuri e1abdb0e5a
This closes #809, and add new fn: HARMEAN 2021-03-25 00:05:02 +08:00
Eagle Xiang 219add2f0e
value fields xlsxPatternFill.FgColor & xlsxPatternFill.BgColor cause … (#770)
* value fields xlsxPatternFill.FgColor & xlsxPatternFill.BgColor cause ineffective omitempty tags

* remove useless omitempty tag on xlsxPatternFill.FgColor and xlsxPatternFill.BgColor
2021-01-28 21:13:23 +08:00
xuri 0aa1510694
update docs and improve compatibility 2020-07-11 02:31:02 +08:00
xuri 15fd56853f
Update docs and typo fixed 2020-06-22 00:14:56 +08:00
xuri 882abb8098
- formula engine: reduce cyclomatic complexity
- styles: allow empty and default cell formats, #628
2020-05-10 16:56:08 +08:00
xuri 1f73a19e0f
Resolve #628, omit number format empty 2020-05-06 00:32:53 +08:00
xuri 9e2318cefa
Resolve #470, export Style structs to allow create the style for cells by given JSON or structure 2020-03-10 00:04:23 +08:00
xuri 09485b3f9f
Improve code coverage unit tests 2019-12-29 16:02:31 +08:00
xuri a34d3b8c86
Compatibility improvement 2019-09-24 21:53:19 +08:00
xuri 75d66a03f3
Fix #482, font strike style support 2019-09-23 21:50:03 +08:00
xuri 9c70d0ac86
Documentation updated, Go 1.10+ required 2019-08-11 00:36:14 +08:00
xuri 821632cf89
Fix #424, refactor merged cells adjuster 2019-06-12 08:10:33 +08:00
xuri 421f945f51
Fixed #418, #420, #421, init adjust calculation chain support
Update testing case
2019-06-08 00:00:55 +08:00
xuri 3997dee1f5
Fix #411, change font size to float type 2019-06-07 09:16:55 +08:00
xuri f91f548614
Resolve #404, get sheet map by target rels. 2019-05-17 22:58:12 +08:00
xuri fabd9d013f
README updated 2019-01-01 13:20:14 +08:00
xuri 3e004d900b
Comments style changed. 2018-09-14 00:58:48 +08:00
xuri 13a9769cc5
Comments style changed. 2018-09-14 00:44:23 +08:00
xuri 2f146c923c
Comments style changed. 2018-09-14 00:35:47 +08:00
xuri b4a6e61ec3
Fix golint errors under confidence 0.1 2018-09-12 15:47:56 +08:00
Ri Xu ecc3adf22a
- Add protection properties associated with the cell support, relate issue #191;
- godoc and go test has been updated
2018-03-07 12:56:18 +08:00
Ri Xu 67636039f6
- Init conditional format support, relate issue #75;
- go test and godoc updated
2017-08-11 23:15:33 +08:00
Ri Xu 5cf3725f02
Add missing element `xfId` of the styles to fix issue #93. 2017-08-07 10:42:10 +08:00
Ri Xu 4a74951e81
- Support set custom number format, relate issue #86;
- go test and godoc updated
2017-07-27 11:46:04 +08:00
Ri Xu 4f942255e4
- Fix missing element in worksheet, workbook and styles. Related issue #81;
- Format code and update readme
2017-07-15 20:03:44 +08:00