xuri
f1d1a5dc2b
This closes #2004 , support apply number format for time and duration cell value
...
- Add unit tests
- Update dependencies modules
2024-10-10 22:44:38 +08:00
liuwangchao
bebb802069
This closes #1999 , fix error on GetCellRichText function when read cell without SST index ( #2000 )
...
- Add unit test for get cell rich text when string item index is invalid
- Add comments for the variable ErrPasswordLengthInvalid
- Update dependencies modules
- Update GitHub Actions workflow configuration, test on Go 1.23.x
2024-09-27 14:58:18 +08:00
xuri
4dd34477f7
This closes #1955 , refs #119 , support to set cell value with an IEEE 754 "not-a-number" value or infinity
2024-07-18 21:05:36 +08:00
xuri
0c3dfb1605
This closes #1903 , made GetCellStyle function concurrency safe
...
- Update comment of the function and unit test
2024-05-26 01:25:49 +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
Evan lu
4ed493819a
This closes #1835 , support get data validations which storage in the extension lists ( #1834 )
2024-03-06 09:26:38 +08:00
陈王
9d4c2e60f6
This closes #1825 , made AddDataValidation and DeleteDataValidation functions concurrency safe ( #1828 )
...
- Remove the receiver of internal coordinatesToRangeRef, squashSqref and flatSqref functions
- Update unit tests
Co-authored-by: chenwang <chenwang@shinsson.com>
2024-03-01 10:12:17 +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
xuri
41259b474f
Recalculate and use the same shared string count and unique count to overwrite incorrect existing values
2023-11-23 00:03:10 +08:00
Tian
55e4d4b2c3
The GetCellRichText function support to return inline rich text ( #1724 )
...
Co-authored-by: jintian.wang <jintian.wang@mihoyo.com>
2023-11-20 23:57:45 +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
d9a0da7b48
This closes #1687 and closes #1688
...
- Using sync map internally to get cell value concurrency safe
- Support set the height and width for the comment box
- Update the unit test
2023-10-11 00:04:38 +08:00
xuri
99df1a7343
This closes #1681 , closes #1683
...
- Fix incorrect formula calculation result
- Introduce new exported function `SetCellUint`
- Updates unit test
- Typo fixed
2023-10-08 00:06:11 +08:00
xuri
1b63d098a7
This improves applying cell value with currency and accounting number format
...
- Update the unit test and dependencies modules
2023-08-21 00:11:55 +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
fudali
dfdd97c0a7
This closes #1199 , support apply number format by system date and time options
...
- Add new options `ShortDateFmtCode`, `LongDateFmtCode` and `LongTimeFmtCode`
- Update unit tests
2023-05-06 20:34:18 +08:00
xuri
7c221cf295
Ref #660 , support placeholder, padding and rounds numbers by specified number format code
...
- Remove built-in number formats functions
- Update unit tests
- Upgrade dependencies package
2023-04-30 11:10:51 +08:00
xuri
612f6f104c
This closes #1528 , closes #1533
...
- Avoid format text cell value as a numeric
- Fix race conditions for concurrency safety functions
2023-04-25 08:44:41 +08:00
xuri
fb6ce60bd5
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
2023-04-19 00:05:59 +08:00
xuri
17c029494a
This closes #1519 , escape XML characters after checking cell value length
2023-04-16 14:22:55 +08:00
Valery Ozarnichuk
635ec33576
Support checking cell value length with multi-bytes characters ( #1517 )
2023-04-12 08:17:10 +08:00
xuri
9dbba9f34a
This closes #1508 , support SST index which contains blank characters
2023-03-28 00:05:18 +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
478b528af1
Breaking changes: changed the function signature for 2 exported functions
...
- Change
`func (f *File) AddPictureFromBytes(sheet, cell, name, extension string, file []byte, opts *GraphicOptions) error`
to
`func (f *File) AddPictureFromBytes(sheet, cell string, pic *Picture) error`
- Change
`func (f *File) GetPicture(sheet, cell string) (string, []byte, error)`
to
`func (f *File) GetPictures(sheet, cell string) ([]Picture, error)`
Co-authored-by: huangsk <645636204@qq.com>
2023-03-19 20:29:35 +08:00
xuri
65a53b3ec6
Breaking changes: replace the type `ShapeParagraph` with `RichTextRun`
...
- This removes the `Color` field from the type `Shape`, and uses the `Fill` instead of it
- Remove sharp symbol from hex RGB color
- Update unit tests
2023-02-27 00:05:36 +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
Liron Levin
a57203a03a
This closes #1432 , fix panic formattedValue when style is negative ( #1433 )
2022-12-29 00:37:37 +08:00
郭伟匡
6a5ee811ba
This closes #1425 , breaking changes for sheet name ( #1426 )
...
- 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: guoweikuang <weikuang.guo@shopee.com>
2022-12-23 00:54:40 +08:00
xuri
ac564afa56
Remove internal error log print, throw XML deserialize error
2022-11-13 00:40:04 +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
Martin Martinez Rivera
75c912ca95
This closes #1384 , fix segmentation fault in `formattedValue` ( #1385 )
...
- Add nil pointer guard in cell format
- Add tests to verify the nil checks in formattedValue
Co-authored-by: Zach Clark <zachmclark@gmail.com>
2022-11-05 12:41:07 +08:00
xuri
f44153ea46
This closes #1377 , stream writer writes inline string type for string cell value
...
- Add `CellTypeFormula`, `CellTypeInlineString`, `CellTypeSharedString` and remove `CellTypeString` in `CellType` enumeration
- Unit tests updated
2022-10-25 10:24:45 +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
xuri
0e657c887b
This closes #1368 , fixes number parsing issue, adds support for create a 3D line chart
2022-10-12 00:06:09 +08:00
xuri
efcf599dfe
This closes #1360 , closes #1361
...
- 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
2022-09-28 00:04:17 +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
xuri
b6cc43d824
This makes 6 functions concurrency safety
...
- These 6 functions now support concurrency safe: SetColWidth, GetColWidth, SetColVisible, GetColVisible, SetColStyle and GetColStyle
2022-09-11 00:04:04 +08:00
davidborry
bef49e40ee
This closes #1330 update non existing sheet error messages ( #1331 )
2022-08-28 00:16:41 +08:00
xuri
cb8bca0e92
This closes #1290 and closes #1328
...
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
2022-08-24 00:00:47 +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
19a0cf3cec
This closed #1163 , fix set cell value with column and row style inherit issue
2022-05-15 15:38:40 +08:00
xuri
eed431e0fc
This closes #1219 , fixes cell value reading issue, improves performance, and 1904 date system support
...
- Fix incorrect cell data types casting results when number formatting
- Support set cell value on 1904 date system enabled, ref #1212
- Improve performance for set sheet row and the merging cells, fix performance impact when resolving #1129
2022-05-02 12:30:18 +08:00
xuri
0f93bd23c9
This closes #1213 , fix get incorrect rich text value caused by missing cell type checking
2022-04-29 13:53:09 +08:00
xuri
8a335225c7
Format code, update documentation and remove exported variable `XMLHeaderByte`
2022-03-24 00:19:30 +08:00
xuri
07be993631
Fixed parsing decimal precision issue
2022-02-18 00:02:39 +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
xuri
74f6ea94ea
ref #1054 , breaking change for the column and row's iterator
...
This removed 3 exported functions: `TotalCols`, `CurrentCol` and `CurrentRow`
2022-01-19 00:51:09 +08:00
xuri
4daa6ed0b4
Breaking change: remove `TotalRows` of row iterator and performance optimization
...
Reduce allocation memory 20%, and 80% GC times for the row's iterator
2022-01-17 08:05:52 +08:00