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
郭伟匡
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
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
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
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
3d02726ad4
This closes #320 , support custom chart axis font style
2022-10-14 00:48:16 +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
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
Artem Tarasenko
73cc4bd449
This closes #1345 , support set custom line color in the charts ( #1346 )
2022-09-14 00:05:05 +08:00
davidborry
bef49e40ee
This closes #1330 update non existing sheet error messages ( #1331 )
2022-08-28 00:16:41 +08:00
xuri
8a335225c7
Format code, update documentation and remove exported variable `XMLHeaderByte`
2022-03-24 00:19:30 +08:00
longphee
74b1a998d6
This closes #1172 , support set hole size for doughnut ( #1173 )
2022-03-09 12:34:48 +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
xuri
790c363cce
This closes #833 , closes #845 , and closes #1022 , breaking changes
...
- Close spreadsheet and row's iterator required
- New options `WorksheetUnzipMemLimit` have been added
- Improve streaming reading performance, memory usage decrease about 93.7%
2021-09-19 11:06:54 +08:00
xuri
684603befa
This closes #993 , closes #1014
...
- Fix formula percentages calculated incorrectly
- Make UpdateLinkedValue skip macro sheet
- Fix conditional format bottom N not working
2021-09-06 00:01:42 +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
yuki2006
dbe88d723e
Fix UpdateLinkedValue which returns an error when has graph sheet ( #793 )
...
* Fixed UpdateLinkedValue which returns an error when there is a graph sheet
Signed-off-by: yuuki.ono <yagfair@gmail.com>
* fix refactoring from review
Signed-off-by: yuuki.ono <yagfair@gmail.com>
2021-03-04 09:23:45 +08:00
xuri
71829c5202
AddChart support disable legend of the chart
2020-12-27 00:18:54 +08:00
xuri
77978ac68d
This closes #657 and closes #748 , AddChart support custom marker symbol and symbol size, fix AddPicture auto fit failure with multi merged cells
2020-12-14 20:56:51 +08:00
xuri
2514bb16c6
Fix #724 , standardize variable naming and update unit tests
2020-11-11 01:03:56 +08:00
Huy Bui (Kevin)
42b1c81488
Resolve #661 Add Logarithmic scale option support on Y axis ( #662 )
...
* Resolve #661 Add Logarithmic scale option support on Y axis
Example usage:
Add the following option into the format string when using AddChart:
"y_axis":{"scaling":{"logbase":"10"}}
* Change type of LogBase from attrValString to attrVarFloat
* Add test case for testing Logarithmic Option in Y axis of charts
* Move field `LogBase` in the format string up one level (remove `Scaling`) as suggested the owner
Test cases are updated accordingly.
2020-07-11 01:07:41 +08:00
xuri
1fe660df64
- Resolve #485 use sheet index instead of ID
...
- added 3 internal function: getSheetID, getActiveSheetID, getSheetNameByID
2020-04-23 02:01:14 +08:00
xuri
3f89c6e979
remove ineffectual variable assignments and simplify code
2020-03-29 18:44:24 +08:00
xuri
6afc468a02
Resolve #451 , support create chart sheet
2020-03-28 23:47:26 +08:00
xuri
cbc3fd21b7
Resolve #455 , init delete picture from spreadsheet support
2020-01-22 01:08:18 +08:00
xuri
0bb245523a
Resolve #557 , init delete chart support
2020-01-19 00:23:00 +08:00
xuri
fa7078f06c
Specified combo chart as variadic parameters
2020-01-16 01:05:22 +08:00
xuri
9ddb52eac4
Fix #554 , init combo chart support, new chart pie of pie, bar of pie chart support
2020-01-14 00:45:21 +08:00
xuri
8b960ee1e6
Fix #547 and #546 , add default overlay element for the chart
2019-12-28 15:05:44 +08:00
xuri
5f3a4bc39f
Fix #538 , added setting a major unit and tick label skip support for the chart
2019-12-25 00:00:50 +08:00
xuri
1666d04559
optimization: checking error in unit tests
2019-12-24 01:09:28 +08:00
xuri
6abf8bf972
Resolve #501 , support set minor grid lines for the chart
2019-10-27 14:16:02 +08:00
xuri
7716968abc
Fix #505 , support set line width of the line chart
2019-10-21 00:04:18 +08:00
xuri
eb520ae277
Improve compatibility for charts
2019-09-26 22:28:14 +08:00
xuri
e77c462d3f
Support to create bubble and 3D bubble chart
2019-06-19 00:01:18 +08:00
xuri
5cf1c05ed4
Add surface 3D, wireframe Surface 3D, contour, and wireframe contour chart support
2019-06-15 20:55:56 +08:00
xuri
dc0869fde3
support to create cone, pyramid and cylinder series chart for column and bar types
2019-06-14 00:05:10 +08:00
xuri
46a3632ee0
Fix #422 , avoid accent theme color index overflow
2019-06-09 09:53:02 +08:00
xuri
a88459d5f1
add unit tests to functions
2019-04-16 10:57:21 +08:00
Veniamin Albaev
dc01264562
Huge refactorig for consistent col/row numbering ( #356 )
...
* Huge refactorig for consistent col/row numbering
Started from simply changing ToALphaString()/TitleToNumber() logic and related fixes.
But have to go deeper, do fixes, after do related fixes and again and again.
Major improvements:
1. Tests made stronger again (But still be weak).
2. "Empty" returns for incorrect input replaces with panic.
3. Check for correct col/row/cell naming & addressing by default.
4. Removed huge amount of duplicated code.
5. Removed ToALphaString(), TitleToNumber() and it helpers functions at all,
and replaced with SplitCellName(), JoinCellName(), ColumnNameToNumber(), ColumnNumberToName(), CellNameToCoordinates(), CoordinatesToCellName().
6. Minor fixes for internal variable naming for code readability (ex. col, row for input params, colIdx, rowIdx for slice indexes etc).
* Formatting fixes
2019-03-20 00:14:41 +08:00
Veniamin Albaev
35426ed5dc
Tests refactoring
...
Primary motivation: Avoid statefull tests with not ignorable git file tree changes.
Multiple tests reads and overwrites signle file for won needs.
Multiple tests reads and overwrites file under version control.
Secondary motivation: Minimal tests logic aligment, separate error expectation
and not error expectation tests. Introduce sub-test over test data sets and so far.
This commit is not ideal but necessary (IMHO)
2018-12-27 13:51:44 +03:00
Eugene Dzhurinsky
1787c3533b
Use format string for chart dimension.
...
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
2018-05-09 08:13:20 -04:00
Eugene Dzhurinsky
e09e47d988
Custom chart size.
...
Added helper functions to set the chart size.
Added the unit test
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
2018-05-08 20:21:26 -04:00