Commit Graph

47 Commits

Author SHA1 Message Date
xuri d21b598235
This closes #1968, closes #1969
- Fix missing conditional formatting after remove column
- Fix the SetSheetVisible function panic on none views sheet
- Updated unit tests
2024-07-31 09:10:05 +08:00
xuri 055349d8a6
Fix a v2.8.1 regression bug, error on duplicate rows, if conditional formatting or data validation has multiple cell range reference
- Update unit tests
2024-04-26 00:23:10 +08:00
jianxinhou f8487a68a8
This closes #1879, compatible with the escaped quote symbol in none formula data validation rules (#1880)
- Update dependencies module to fix vulnerabilities
- Update unit tests

Co-authored-by: houjianxin.rupert <houjianxin.rupert@bytedance.com>
2024-04-18 13:21:46 +08:00
xuri 5f8a5b8690
This closes #1867, breaking changes: change the data type for the ConditionalFormatOptions structure field Format as a pointer 2024-04-03 08:44:46 +08:00
xuri 703b73779c
This closes #1861, fix missing parentheses in the adjusted formula
- Allow adjust cell reference with max rows/columns
- Fix incorrect data validation escape result
- Update out date reference link in the documentation
- Update unit tests
2024-03-25 08:33:29 +08:00
hu5ky 4eb088cf73
This fix performance impact introduced in #1692 (#1849)
Co-authored-by: chun.zhang2 <chun.zhang2@geely.com>

- This fix speed slowdown and memory usage increase base on the reverts commit 6220a798fd
- Fix panic on read workbook with internal row element without r attribute
- Update the unit tests
2024-03-15 11:36:34 +08:00
xuri f20bbd1f1d
This closes #1830, closes #1831, and closes #1833
- Fix a v2.8.1 regression bug, auto filter does not work in the LibreOffice
- Fix a v2.8.1 regression bug, support to adjust data validation with multiple cell range
- Fix incorrect result data type of the DATE formula function
- Update the unit tests
2024-03-04 21:40:27 +08:00
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
lujin 6220a798fd
This closes #1723, fix panic on read workbook in some cases (#1692)
- Fix panic on read workbook with internal row element without r attribute
- Check worksheet XML before get all cell value by column or row
- Update the unit tests
2023-11-18 16:44:45 +08:00
xuri c7acf4fafe
Support update data validations on inserting/deleting columns/rows 2023-11-11 00:04:05 +08:00
ByteFlyCoding e014a8bb23
Support update conditional formatting on inserting/deleting columns/rows (#1717)
Return error for unsupported conditional formatting rule types
2023-11-10 09:25:59 +08:00
xuri a0252bd05a
Support update defined names on inserting/deleting columns/rows 2023-11-08 00:01:35 +08:00
Anton Petrov fe639faa45
This closes #1125, support update drawing objects on inserting/deleting columns/rows (#1127) 2023-11-06 09:51:19 +08:00
xuri 7291e787bd
Support update volatile dependencies on inserting/deleting columns/rows 2023-11-02 00:15:41 +08:00
rjtee b41a6cc3cd
Support to adjust formula cross worksheet on inserting/deleting columns/rows (#1705) 2023-11-01 00:52:18 +08:00
xuri 5bba8f9805
This improves compatibility for adjusting tables and formula references on inserting/deleting columns or rows 2023-10-31 00:01:57 +08:00
rjtee cf3e0164d9
Support adjust formula for entire cols/rows reference (#1702)
- Update the unit tests
2023-10-29 13:40:21 +08:00
rjtee a8cbcfa39b
This closes #1306 and closes #1615 (#1698)
- Support adjust formula on inserting/deleting columns/rows
2023-10-24 00:05:52 +08:00
lidp20 e2c7416292
This closes #1565, support adjust formula when instering columns and rows (#1567) 2023-07-04 00:06:37 +08:00
xuri 76cd0992b0
This closes #1539, fix adjust table issue when after removing rows 2023-05-23 00:18:55 +08:00
xuri 60b9d029a6
Breaking changes: changed the function signature for 4 exported functions
- 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
2023-03-25 13:30:13 +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 bd5dd17673
This is a breaking change, remove partial internal error log print, throw XML deserialize error
- Add error return value for the `GetComments`, `GetDefaultFont` and `SetDefaultFont` functions
- Update unit tests
2022-11-12 00:16:23 +08:00
xuri 58b5dae5eb
Support update column style when inserting or deleting columns
- Go Modules dependencies upgrade
- Unify internal variable name
- Unit test updated
2022-11-11 01:50:07 +08:00
xuri adf9d37d82
This closes #1379, cleanup stream writer temporary files by the `Close` function
- Fix error on inserting columns or rows on the worksheet which contains one cell merged cell range
- Fix getting incomplete rich text cell value in some cases
- Unit tests updated
2022-10-26 00:04:23 +08:00
xuri 3f702999e6
Using the specialized name in a variable and making comments clear
- Add JSON tags for `AppProperties`, `PivotTableOption` and `PivotTableField` structure
2022-09-18 00:07:15 +08:00
Kostya Privezentsev 18cd63a548
This is a breaking change closes #1332 (#1333)
This use `InsertRows` instead of `InsertRow`, and using `InsertCols` instead of `InsertCol`
2022-08-31 00:02:48 +08:00
davidborry bef49e40ee
This closes #1330 update non existing sheet error messages (#1331) 2022-08-28 00:16:41 +08:00
xuri 40ed1d1b81
Fix potential file corrupted when changing cell value or the col/row
- Remove shared formula subsequent cell when setting the cell values
- Support adjust table range when removing and inserting column/row
2022-07-16 12:50:40 +08:00
xuri 3ee3c38f9c
Fix file corrupted in some cases, check file extension and format code
Fix file corrupted when save as in XLAM / XLSM / XLTM / XLTX extension in some case
New exported error ErrWorkbookExt has been added, and check file extension on save the workbook
Format source code with `gofumpt`
2022-01-23 00:48:26 +08:00
Dokiy 67127883dd
Fix adjustMergeCells not modifies cell rect (#1118) 2022-01-14 00:28:31 +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 44a13aa402
Export 7 errors so users can act differently on different type of errors 2021-12-07 00:26:53 +08:00
Dokiy 3325c3946d
Fix adjustMergeCellsHelper and add some test cases (#1082)
Signed-off-by: Dokiys <dokiychang@gmail.com>
2021-12-06 22:37:25 +08:00
three f6f14f507e
Speed up merge cells 2021-08-13 01:32:44 +08:00
xuri cf9fbafdd8
This closes #979, fix the data validation deletion issue and tidy the internal function in the source code 2021-08-06 22:44:43 +08:00
xuri 544ef18a8c
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg`
- Exported error message
2021-07-05 00:03:56 +08:00
xuri be12cc27f1
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message 2021-05-10 00:09:24 +08:00
xuri 1f329e8f96
This closes #774, closes #775 and closes #776
- correct adjust calculation chain in duplicate rows
- correct adjust defined name in the workbook when delete worksheet
- use absolute reference in the auto filters defined name to make it compatible with OpenOffice
- API `CoordinatesToCellName` have a new optional param to specify if using an absolute reference format
- Fix cyclomatic complexity issue of internal function `newFills` and `parseToken`
2021-02-02 22:23:16 +08:00
xuri d1926675f8
- Resolve #627, improve multi-series line chart compatibility with KingSoft WPS
- Avoid to create duplicate style
- Update unit test for the auto filter
- Init code scanning alerts
2020-10-11 00:15:04 +08:00
xuri 09485b3f9f
Improve code coverage unit tests 2019-12-29 16:02:31 +08:00
xuri 9f8623047d
Optimize code, fix golint issues 2019-06-20 00:00:40 +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 a88459d5f1
add unit tests to functions 2019-04-16 10:57:21 +08:00
xuri f2df344739
Resolve #369,#370
add error return value

exported functions:

GetMergeCells
ProtectSheet
UnprotectSheet
UpdateLinkedValue
GetMergeCells
SetSheetVisible

inner functions:

workSheetReader
copySheet
2019-04-15 11:22:57 +08:00
xuri f0244c0016
Add unit test to improve testing coverage 2019-03-24 13:08:32 +08:00