summaryrefslogtreecommitdiff
path: root/sheetview.go
Commit message (Collapse)AuthorAge
* 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
* 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 #1244 and closes #1314, improving the compatibility with Google ↵xuri2022-08-13
| | | | | | Sheet - Format code with `gofmt`
* Fix potential file corrupted and change worksheet name case-insensitivexuri2022-07-18
| | | | | | - Using sheet ID instead of sheet index when delete the cell in calculation chain - Update documentation for exported functions - Using `sheet` represent the sheet name in the function parameters
* This fix potential panic and file corruptedxuri2022-07-14
| | | | | | - Fix the panic when set or get sheet view options on the sheet without views options - Fix generated workbook corruption caused by empty created or modified dcterms in the document core properties - Update the unit tests
* 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
* 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
* Support workbook views Showruler settings (#1138)David2022-02-06
|
* Support workbook views settings (#1136)David2022-02-04
|
* Typo fix, rename exported constants, dependencies modules and copyright updatexuri2022-01-09
| | | | Rename exported constants `NameSpaceDublinCoreMetadataIntiative` to `NameSpaceDublinCoreMetadataInitiative`
* Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, ↵xuri2021-04-04
| | | | IMCSCH, IMEXP, IMLN and IMLOG10
* #65 fn: N, PERCENTILE.INC and Txuri2021-03-30
| | | | typo fixed
* fix custom row height check issuexuri2021-02-08
|
* Fix #724, standardize variable naming and update unit testsxuri2020-11-11
|
* Update docs and typo fixedxuri2020-06-22
|
* Improve code coverage unit testsxuri2019-12-29
|
* Add missing ShowZeros SheetViewOption implementationjaby2019-09-30
|
* Documentation updated, Go 1.10+ requiredxuri2019-08-11
|
* Update commentszhaov2019-08-06
|
* add comments for SheetView parametersxuri2019-07-08
|
* Resolve #369,#370xuri2019-04-15
| | | | | | | | | | | | | | | | | | add error return value exported functions: GetMergeCells ProtectSheet UnprotectSheet UpdateLinkedValue GetMergeCells SetSheetVisible inner functions: workSheetReader copySheet
* README updatedxuri2019-01-01
|
* Fixes #310, support set and get TopLeftCell properties of sheet view optionsxuri2018-12-18
|
* Comments style changed.xuri2018-09-14
|
* Comments style changed.xuri2018-09-14
|
* Comments style changed.xuri2018-09-14
|
* Fix golint errors under confidence 0.1xuri2018-09-12
|
* Added ZoomScale SheetViewOptionOloloevReal2018-04-16
| | | | | | | Accessible value between 10 - 400 Used as: xlsx.SetSheetViewOptions(sheet, 0, excelize.ZoomScale(75))
* SheetViewOptionPtr: document that it is a superset of SheetViewOptionOlivier Mengué2017-11-17
| | | | | | | | | | | | | Document in type system (not just in text for humans) that all SheetViewOptionPtr are also SheetViewOption (well, if not nil). This improves documentation visible with godoc but this simple change also allows more flexibility to manipulate SheetViewOption programatically such as saving and restoring values: var opt excelize.ShowFormulas opt = new(excelize.ShowFormulas) _ = xl.GetSheetViewOptions(sheet, -1, opt) _ = xl.SetSheetViewOptions(sheet, -1, opt)
* Add SetSheetViewOptions and GetSheetViewOptions (#145)Olivier Mengué2017-11-16
Two new methods: - SetSheetViewOptions(sheetName string, viewIndex int, opts ...SheetViewOption) error - GetSheetViewOptions(sheetName string, viewIndex int, opts ...SheetViewOptionPtr) error The option values are given by the user through types that have privates methods that implement the private SheetViewOption and SheetViewOptionPtr interfaces: - DefaultGridColor(bool) - RightToLeft(bool) - ShowFormulas(bool) - ShowGridLines(bool) - ShowRowColHeaders(bool) Examples: err := xl.SetSheetViewOptions("Sheet1", -1, excelize.ShowGridLines(true)) var showGridLines excelize.ShowGridLines err := xl.GetSheetViewOptions("Sheet1", -1, &showGridLines) Fixes #145.