summaryrefslogtreecommitdiff
path: root/sheetpr_test.go
Commit message (Collapse)AuthorAge
* 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
* Support to set summary columns to appear to the right of detail in an outlinexuri2022-10-08
| | | | | | - Simplify calculation engine code - Update documentation for the functions - Update dependencies module
* 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
* Using the specialized name in a variable and making comments clearxuri2022-09-18
| | | | - Add JSON tags for `AppProperties`, `PivotTableOption` and `PivotTableField` structure
* This closes #1330 update non existing sheet error messages (#1331)davidborry2022-08-28
|
* Add new exported `ColorMappingType` used for color transformationxuri2022-08-06
| | | | Using `ColorMappingType` color transformation types enumeration for tab color index, ref #1285
* This closes #1283, support set and get color index, theme and tint for sheet tabThomas Charbonnel2022-07-26
| | | | | This commit renames `TabColor` into `TabColorRGB` (but keeps an alias for backwards compatibility), as well as adds support for more tab color options (Theme, Indexed and Tint). Signed-off-by: Thomas Charbonnel <github@charbonnel.email>
* 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`
* - Support concurrency iterate rows and columnsxuri2021-07-05
| | | | | - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message
* This closes #785, support to change tab color; new formula function: FISHER, ↵xuri2021-02-16
| | | | FISHERINV, GAMMA, GAMMALN, MIN, MINA, PERMUT
* extend cell value load to support custom datetime format (#703)Artem Kustikov2020-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | * extend cell value load to support custom datetime format * cleanup incorrect imports * fix numeric values conversion as done in legacy Excel * fix tests coverage * revert temporary package name fix * remove personal info from test XLSX files * remove unused dependencies * update format conversion in parseTime * new UT to increase code coverage * Resolve code review issue for PR #703 * Rename broken file name generated by unit test Co-authored-by: xuri <xuri.me@gmail.com>
* - New API: SetSheetFormatPr and GetSheetFormatPrxuri2020-05-12
| | | | - typo fix, resolve #635
* Resolve #580, revert commit ↵xuri2020-02-19
| | | | https://github.com/360EntSecGroup-Skylar/excelize/commit/5ca7231ed408ac264f509ff52b5d28ff4fbda757
* optimize code and comments: use println errors instead of panicxuri2020-01-03
|
* Optimize code of Getting/Setting Page Marginsxuri2019-10-17
|
* Fix dependency on github.com/360EntSecGroup-Skylar/excelize v1Ben Wells2019-09-13
|
* Testing files updatedxuri2019-09-02
|
* Resolve #393, upgrade Go module to v2xuri2019-05-02
|
* add unit tests to functionsxuri2019-04-16
|
* Tests refactoringVeniamin Albaev2018-12-27
| | | | | | | | | | | 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)
* Add support to flip outline summariesHarris2018-12-13
| | | | | | | | | This adds outlinePr support, with the summaryBelow attribute which defaults to true. Closes #304 Signed-off-by: Michael Harris
* GitHub repo URL changed.Ri Xu2017-12-01
|
* - 24 hour time format supported, relate issue #163;Ri Xu2017-12-01
| | | | - godoc and go test updated
* Add {G,S}etSheetPrOptions()Olivier Mengué2017-11-17
Add SetSheetPrOptions and GetSheetPrOptions to allow to set options on <sheetPr> and <pageSetUpPr>. The following options are implemented: - CodeName (string) - EnableFormatConditionsCalculation (bool) - Published (bool) - FitToPage (bool) - AutoPageBreaks (bool)