Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | This closes #1358, made a refactor with breaking changes, see details: | xuri | 2022-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 fix potential panic and file corrupted | xuri | 2022-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 | ||
* | This closes #1139, `SetCellDefault` support non-numeric value | xuri | 2022-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) | David | 2022-02-06 |
| | |||
* | Support workbook views settings (#1136) | David | 2022-02-04 |
| | |||
* | Fix file corrupted in some cases, check file extension and format code | xuri | 2022-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` | ||
* | extend cell value load to support custom datetime format (#703) | Artem Kustikov | 2020-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> | ||
* | Resolve #580, revert commit ↵ | xuri | 2020-02-19 |
| | | | | https://github.com/360EntSecGroup-Skylar/excelize/commit/5ca7231ed408ac264f509ff52b5d28ff4fbda757 | ||
* | optimize code and comments: use println errors instead of panic | xuri | 2020-01-03 |
| | |||
* | Add missing ShowZeros SheetViewOption implementation | jaby | 2019-09-30 |
| | |||
* | Fix dependency on github.com/360EntSecGroup-Skylar/excelize v1 | Ben Wells | 2019-09-13 |
| | |||
* | Testing files updated | xuri | 2019-09-02 |
| | |||
* | Resolve #393, upgrade Go module to v2 | xuri | 2019-05-02 |
| | |||
* | Tests refactoring | Veniamin Albaev | 2018-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) | ||
* | Fixes #310, support set and get TopLeftCell properties of sheet view options | xuri | 2018-12-18 |
| | |||
* | Added ZoomScale SheetViewOption | OloloevReal | 2018-04-16 |
| | | | | | | | Accessible value between 10 - 400 Used as: xlsx.SetSheetViewOptions(sheet, 0, excelize.ZoomScale(75)) | ||
* | GitHub repo URL changed. | Ri Xu | 2017-12-01 |
| | |||
* | - 24 hour time format supported, relate issue #163; | Ri Xu | 2017-12-01 |
| | | | | - godoc and go test updated | ||
* | SheetViewOptionPtr: document that it is a superset of SheetViewOption | Olivier 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. |