summaryrefslogtreecommitdiff
path: root/styles.go
Commit message (Collapse)AuthorAge
* Remove internal error log print, throw XML deserialize errorxuri2022-11-13
|
* This is a breaking change, remove partial internal error log print, throw ↵xuri2022-11-12
| | | | | | | XML deserialize error - Add error return value for the `GetComments`, `GetDefaultFont` and `SetDefaultFont` functions - Update unit tests
* Fix the error on getting the range of merged cells on the worksheet which ↵xuri2022-10-28
| | | | | | | | contains one cell merged cell range - Parse workbook default theme for custom theme color support in the feature - Variables name typo fix - Add system foreground and background color as RGB in the IndexedColorMapping list
* Support get cell value which contains a date in the ISO 8601 formatxuri2022-10-24
| | | | | | | | - 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
* This close #1373, fixes the incorrect build-in number format apply the resultxuri2022-10-20
| | | | | - An error will be returned when setting the stream row without ascending row numbers, to avoid potential mistakes as mentioned in #1139 - Updated unit tests
* This closes #1369, support set, and get font color with theme and tint (#1370)GaoFei2022-10-15
|
* This closes #320, support custom chart axis font stylexuri2022-10-14
|
* This closes #1368, fixes number parsing issue, adds support for create a 3D ↵xuri2022-10-12
| | | | line chart
* This closes #1358, made a refactor with breaking changes, see details:xuri2022-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This made a refactor with breaking changes: Motivation and Context When I decided to add set horizontal centered support for this library to resolve #1358, the reason I made this huge breaking change was: - There are too many exported types for set sheet view, properties, and format properties, although a function using the functional options pattern can be optimized by returning an anonymous function, these types or property set or get function has no binding categorization, so I change these functions like `SetAppProps` to accept a pointer of options structure. - Users can not easily find out which properties should be in the `SetSheetPrOptions` or `SetSheetFormatPr` categories - Nested properties cannot proceed modify easily Introduce 5 new export data types: `HeaderFooterOptions`, `PageLayoutMarginsOptions`, `PageLayoutOptions`, `SheetPropsOptions`, and `ViewOptions` Rename 4 exported data types: - Rename `PivotTableOption` to `PivotTableOptions` - Rename `FormatHeaderFooter` to `HeaderFooterOptions` - Rename `FormatSheetProtection` to `SheetProtectionOptions` - Rename `SparklineOption` to `SparklineOptions` Remove 54 exported types: `AutoPageBreaks`, `BaseColWidth`, `BlackAndWhite`, `CodeName`, `CustomHeight`, `Date1904`, `DefaultColWidth`, `DefaultGridColor`, `DefaultRowHeight`, `EnableFormatConditionsCalculation`, `FilterPrivacy`, `FirstPageNumber`, `FitToHeight`, `FitToPage`, `FitToWidth`, `OutlineSummaryBelow`, `PageLayoutOption`, `PageLayoutOptionPtr`, `PageLayoutOrientation`, `PageLayoutPaperSize`, `PageLayoutScale`, `PageMarginBottom`, `PageMarginFooter`, `PageMarginHeader`, `PageMarginLeft`, `PageMarginRight`, `PageMarginsOptions`, `PageMarginsOptionsPtr`, `PageMarginTop`, `Published`, `RightToLeft`, `SheetFormatPrOptions`, `SheetFormatPrOptionsPtr`, `SheetPrOption`, `SheetPrOptionPtr`, `SheetViewOption`, `SheetViewOptionPtr`, `ShowFormulas`, `ShowGridLines`, `ShowRowColHeaders`, `ShowRuler`, `ShowZeros`, `TabColorIndexed`, `TabColorRGB`, `TabColorTheme`, `TabColorTint`, `ThickBottom`, `ThickTop`, `TopLeftCell`, `View`, `WorkbookPrOption`, `WorkbookPrOptionPtr`, `ZeroHeight` and `ZoomScale` Remove 2 exported constants: `OrientationPortrait` and `OrientationLandscape` Change 8 functions: - Change the `func (f *File) SetPageLayout(sheet string, opts ...PageLayoutOption) error` to `func (f *File) SetPageLayout(sheet string, opts *PageLayoutOptions) error` - Change the `func (f *File) GetPageLayout(sheet string, opts ...PageLayoutOptionPtr) error` to `func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error)` - Change the `func (f *File) SetPageMargins(sheet string, opts ...PageMarginsOptions) error` to `func (f *File) SetPageMargins(sheet string, opts *PageLayoutMarginsOptions) error` - Change the `func (f *File) GetPageMargins(sheet string, opts ...PageMarginsOptionsPtr) error` to `func (f *File) GetPageMargins(sheet string) (PageLayoutMarginsOptions, error)` - Change the `func (f *File) SetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOption) error` to `func (f *File) SetSheetView(sheet string, viewIndex int, opts *ViewOptions) error` - Change the `func (f *File) GetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOptionPtr) error` to `func (f *File) GetSheetView(sheet string, viewIndex int) (ViewOptions, error)` - Change the `func (f *File) SetWorkbookPrOptions(opts ...WorkbookPrOption) error` to `func (f *File) SetWorkbookProps(opts *WorkbookPropsOptions) error` - Change the `func (f *File) GetWorkbookPrOptions(opts ...WorkbookPrOptionPtr) error` to `func (f *File) GetWorkbookProps() (WorkbookPropsOptions, error)` Introduce new function to instead of existing functions: - New function `func (f *File) SetSheetProps(sheet string, opts *SheetPropsOptions) error` instead of `func (f *File) SetSheetPrOptions(sheet string, opts ...SheetPrOption) error` and `func (f *File) SetSheetFormatPr(sheet string, opts ...SheetFormatPrOption
* This closes #1360, closes #1361xuri2022-09-28
| | | | | | | - 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
* Using the specialized name in a variable and making comments clearxuri2022-09-18
| | | | - Add JSON tags for `AppProperties`, `PivotTableOption` and `PivotTableField` structure
* This makes 6 functions concurrency safetyxuri2022-09-11
| | | | - These 6 functions now support concurrency safe: SetColWidth, GetColWidth, SetColVisible, GetColVisible, SetColStyle and GetColStyle
* This closes #1323, an error will be returned when set the not exist style IDxuri2022-09-01
|
* This closes #1330 update non existing sheet error messages (#1331)davidborry2022-08-28
|
* This closes #827, add new functions `GetDataValidations` and ↵chenliu19932022-08-27
| | | | | `GetConditionalFormats` (#1315) Signed-off-by: chenliu1993 <13630583107@163.com>
* This closes #1290 and closes #1328xuri2022-08-24
| | | | | - 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
* This closes #1244 and closes #1314, improving the compatibility with Google ↵xuri2022-08-13
| | | | | | Sheet - Format code with `gofmt`
* refactor: replace strings.Replace with strings.ReplaceAll (#1250)Eng Zer Jun2022-06-12
| | | | | | | strings.ReplaceAll(s, old, new) is a wrapper function for strings.Replace(s, old, new, -1). But strings.ReplaceAll is more readable and removes the hardcoded -1. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* This fix formula calculation accuracy issue and panic when set panexuri2022-05-23
| | | | | - Fix `GROWTH` and `TREND` calculation accuracy issue - Fix panic when add pane on empty sheet views worksheet - New exported constants `MinFontSize`
* This fixes a part of staticcheck issues and updates the code of conductxuri2022-05-18
| | | | Update example for set cell hyperlinks with `HyperlinkOpts`
* This closed #1163, fix set cell value with column and row style inherit issuexuri2022-05-15
|
* This closes #1212, init support for 1900 or 1904 date systemxuri2022-04-30
|
* This closes #1211, improve the compatibility with invalid internal styles countxuri2022-04-28
|
* Format code, update documentation and remove exported variable `XMLHeaderByte`xuri2022-03-24
|
* This closes #1148, resolve limitations when adding VBA project to the workbookxuri2022-02-17
| | | | | | | | 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
* Ref: #660, #764, #1093, #1112, #1133 This improve number format supportxuri2022-02-13
| | | | | | - Introduced NFP (number format parser) dependencies module - Initialize custom dates and times number format support - Dependencies module upgraded
* This closes #1139, `SetCellDefault` support non-numeric valuexuri2022-02-08
| | | | | | | | - Add default value on getting `View` property of sheet views - Add examples and unit test for set sheet views - Re-order field on sheet view options - Fix incorrect build-in number format: 42 - Simplify code for the `stylesReader` function
* This closes #1129, make cell support inheritance columns/rows stylexuri2022-01-27
| | | | | | Correct cells style in merge range Fix incorrect style ID returned on getting cell style in some cases Unit test updated and simplified code
* Fix file corrupted in some cases, check file extension and format codexuri2022-01-23
| | | | | | 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`
* Typo fix, rename exported constants, dependencies modules and copyright updatexuri2022-01-09
| | | | Rename exported constants `NameSpaceDublinCoreMetadataIntiative` to `NameSpaceDublinCoreMetadataInitiative`
* Update create style example, using a pointer of the structure instead of JSONxuri2022-01-05
|
* This closes #1096, memory usage optimization and another 4 changesxuri2021-12-27
| | | | | | | | - Unzip shared string table to system temporary file when large inner XML, reduce memory usage about 70% - Remove unnecessary exported variable `XMLHeader`, we can using `encoding/xml` package's `xml.Header` instead of it - Using constant instead of inline text for default XML path - Rename exported option field `WorksheetUnzipMemLimit` to `UnzipXMLSizeLimit` - Unit test and documentation updated
* Simplify code and update unit testxuri2021-12-03
| | | | | Improve unit test coverage for the functions: `NewStyle`, `SetActiveSheet`, `SearchSheet` and `deleteAndAdjustDefinedNames` Simplify code and add comments for the function: `deleteAndAdjustDefinedNames`
* Fix call getNumFmtID with builtInNumFmt return -1Dokiy2021-12-01
|
* ref #65: new formula function YIELDxuri2021-11-29
|
* This closes #1060, fix build-in time number format parse errorxuri2021-11-20
|
* ref #65: new formula function PRICExuri2021-11-17
| | | | | - fix COUPPCD result accuracy issue - update close spreadsheet example in documentation and README
* This closes #1027 and closes #1028xuri2021-09-28
| | | | | * Fix build-in scientific number format failed * An error will be returned if given an invalid custom number format when creating a new style
* This closes #993, closes #1014xuri2021-09-06
| | | | | | - Fix formula percentages calculated incorrectly - Make UpdateLinkedValue skip macro sheet - Fix conditional format bottom N not working
* - This fix panic and incorrect cell read on some casexuri2021-08-22
| | | | | - Make unit test on Go 1.7 - API documentation updated
* This closes #989, closes #990xuri2021-08-17
| | | | | New API: `SetRowStyle` support for set style for the rows Update documentation for the `GetRows`, `SetCellStyle` and `SetColStyle`
* This closes #971, closes #972 and closes #974xuri2021-07-29
| | | | | | | | - Escape XML character in the drop list - Fix incorrect character count limit in the drop list - Fix Excel time parse issue in some case - Fix custom number format month parse issue in some case - Fix corrupted file generated caused by concurrency adding pictures
* Fix code security issuexuri2021-07-20
|
* Make the functions `SetSheetRow`, `New Style` and `SetCellStyle` concurrency ↵xuri2021-07-07
| | | | safety
* - Support concurrency iterate rows and columnsxuri2021-07-05
| | | | | - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message
* * This closes #841, fix incorrect build number format in PR #839ice2021-05-15
|
* "15" is the correct 24 hours time format in go (#839)ice2021-05-14
| | | | * "15" is the correct 24 hours time format in go * fix number format convert issue and remove the `dateTimeFormatsCache`
* Fixe issue generated file corrupted caused by incorrect default XML ↵xuri2021-04-30
| | | | namespace attributes
* Fixed #823, 12/24 hours time format parsing errorxuri2021-04-20
|
* Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, ↵xuri2021-04-04
| | | | IMCSCH, IMEXP, IMLN and IMLOG10