xuri
294f2e1480
Require using ChartType enumeration value to specify the chart type
...
- Update docs and unit tests
2023-04-01 00:08:53 +08:00
xuri
3b807c4bfe
This support get cell hyperlink for merged cells
2023-03-29 00:00:27 +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
playGitboy
5878fbd282
This closes #1503 , case-insensitive for the file extension name
2023-03-23 00:06:10 +08:00
ChantXu64
a34c81e1cc
This closes #1448 , speed up for checking merged cells ( #1500 )
2023-03-20 09:17:28 +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
7631fd08e1
This closes #1499 , support to set number format for chart data labels and axis
2023-03-18 20:45:34 +08:00
Rizki Putra
e394f01a97
This update the return value for the `CalcCellValue` function ( #1490 )
...
- Using formula error string in the result of the `CalcCellValue` function
- Using the error message in the `CalcCellValue` function returns error
- Update unit tests
2023-03-15 09:17:30 +08:00
xuri
0d193c76ac
This closes #1492 , fix data bar min/max value doesn't work
2023-03-14 00:58:20 +08:00
xuri
dc3bf331d5
Breaking change: changed the third parameter for the `AddFilter`
...
- Support to add multiple filter columns
- Remove the exported type `AutoFilterListOptions`
- Support to specify if show header row of the table
- Update unit tests and documents of the function
2023-03-04 00:07:04 +08:00
张涛
f707b2d2da
This closes #1484 , fix the formula calc result issue ( #1485 )
...
- Optimize variable name for data validation
2023-03-01 13:25:17 +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
Baris Mar Aziz
669c432ca1
This fixes #756 , made stream writer skip set cell value when got nil ( #1481 )
2023-02-24 00:18:10 +08:00
xuri
94e86dca31
This renamed conditional format type `iconSet` to `icon_set`
...
- Remove Minimum, Maximum, MinLength, and MaxLength fields from the type `ConditionalFormatOptions`
- Update unit tests and format code
2023-02-22 22:46:36 +08:00
Shugo Kawamura
f143dd5c34
Support double-byte chars for formula functions LENB, RIGHTB and MIDB ( #1478 )
2023-02-21 00:17:35 +08:00
Shugo Kawamura
983cd76485
This closes #1476 , support double-byte chars for formula functions LEFT,RIGHT, LEN and MID ( #1477 )
2023-02-20 13:59:05 +08:00
xuri
cb0c1b012b
Support specifies the values in second plot for the bar/pie of pie chart
...
- Upgrade dependencies package golang.org/x/image to 0.5.0
- Update unit tests
2023-02-19 00:18:11 +08:00
dependabot[bot]
21ec143778
Update dependencies package golang.org/x/net from 0.5.0 to 0.7.0 ( #1475 )
2023-02-18 14:28:47 +08:00
xuri
c2d6707a85
This closes #1474 , support set the format for the data series fill (solid fill)
...
- Breaking changes: remove the `Color` field in the `ChartLine` structure
- This support set the bubble size in a data series
- Unit test update and correct the docs of the function `GetSheetDimension`
2023-02-17 20:03:46 +08:00
jaby
ad90cea78b
This closes #1469 , fix cell resolver caused incorrect calculation result ( #1470 )
2023-02-15 21:38:11 +08:00
xuri
363fa940ac
This closes #1468 , checks the table name, and added a new error constant `ErrTableNameLength`
...
- XML Structure field typo fixed
- Update documentation for the `AddChart` function
- Update unit test
2023-02-13 13:28:02 +08:00
Josh Weston
38f131728b
This closes #1463 , add new functions `SetSheetDimension` and `GetSheetDimension` ( #1467 )
2023-02-11 18:37:06 +08:00
xuri
753969dc4e
Support creating a conditional format with an "icon sets" rule
...
- Improvement compatibility for the worksheet extension lists
- Update unit test
2023-02-08 00:03:45 +08:00
xuri
3e2406096f
This closes #1462 and closes #1464
...
- Support creating a conditional format with a "stop if true" rule
- Support set border color and create solid color for the color data bar
- Fix incorrect cell type when modifying string cell with the time number
- Update unit test for the add pivot table to avoid pivot table range overlap
2023-02-07 00:08:11 +08:00
xuri
1f69f6b24a
Add support for insert BMP format images
...
- Add support for workbook function groups
- Update code and docs for the build-in currency number format
- Update unit tests
2023-02-05 01:30:38 +08:00
xuri
12645e7116
This fixes #1461 , supports 0 row height and column width
...
- Increase max cell styles to 65430
- Add new exported error variable `ErrCellStyles`
- Update unit tests, support test under Go 1.20.x
2023-02-03 00:08:46 +08:00
xuri
85e0b6c56e
Support to create of 17 kinds of fill variants styles
...
- Update the unit tests
- Update the `SetHeaderFooter` function parameters name
- Update document for the `SetDocProps` and `SetCellHyperLink` functions
2023-02-01 00:11:08 +08:00
Nathan Davies
be36b09c8a
This fixes #1457 , reduce string concatenation when applying number format ( #1459 )
...
Co-authored-by: Nathan Davies <ndavies@turnitin.com>
2023-01-26 10:35:13 +08:00
Nathan Davies
1ab7a99bf0
This fixes #1455 , pre generate strings months name for number format ( #1456 )
...
- Reducing string concatenation and string conversion between rune string data types
Co-authored-by: Nathan Davies <ndavies@turnitin.com>
2023-01-25 12:22:28 +08:00
xuri
917e6e19d6
This roundup time value when a millisecond great than 500 to fix the accuracy issue
...
- Correction example in the documentation of set cell formula
- Rename the internal function `parseOptions` to `getOptions`
- Update unit tests
2023-01-20 03:10:04 +00:00
xuri
4f0025aab0
This closes #1447 , add support for strict theme namespace
...
- Support specify if applying number format style for the cell calculation result
- Reduce cyclomatic complexities for the OpenReader function
2023-01-13 00:05:46 +08:00
Liron Levin
00c58a73f3
Fix panic caused by the workbook relationship part not exist ( #1443 )
...
- Check nil map in the getSheetMap function
- Update unit tests
2023-01-12 00:14:38 +08:00
xuri
14d7acd97e
This fixes #1441 , add copyright agreement statement on the LICENSE
2023-01-10 01:02:48 +08:00
xuri
5429f131f8
This closes #1438 , fix cell data type issue for formula calculation engine
...
- Update dependencies module
- Update unit tests
2023-01-08 00:23:53 +08:00
Liron Levin
9c3a5eb983
Add missing error checks in `getSheetMap` to fix panic( #1437 )
...
Unit tests updated
2023-01-07 13:17:00 +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
Gin
0c76766c2b
Add support for workbook protection ( #1431 )
2022-12-27 00:06:18 +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
Bayzet Tlyupov
ce4f7a25c9
This closes #1416 , support set row outline level to stream ( #1422 )
...
Co-authored-by: TlyupovBM <bajjzet.tlyupov@vseinstrumenti.ru>
2022-12-19 09:28:43 +08:00
nesstord
61fda0b1ca
Fix binary string regex ( #1415 )
2022-12-07 00:45:27 +08:00
jianxinhou
5e0953d778
This closes #1405 , add new function SetSheetBackgroundFromBytes ( #1406 )
...
Co-authored-by: houjianxin.rupert <houjianxin.rupert@bytedance.com>
2022-12-01 10:44:28 +08:00
xuri
c0713951c8
This closes #1404 , fixes the insert picture problem in some cases
...
- Updates unit tests
- Updates documentation for stream mode functions
- Updates hyperlinks in the documentation
2022-11-29 00:03:49 +08:00
devloppper
dde6b9c001
This closes #1396 , fix formula fn ADDRESS result error with empty worksheet name ( #1397 )
...
- Update unit tests
Co-authored-by: jayhoo <hujie@ynningneng.com>
2022-11-22 00:15:57 +08:00
renxiaotu
aa80fa4179
This made stream writer support set the insert page break ( #1393 )
2022-11-16 00:02:35 +08:00
xuri
45d168c79d
This closes #1391 , escape XML characters to avoid with corrupt file
...
- Update and improve unit test coverage
2022-11-15 22:08:37 +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