summaryrefslogtreecommitdiff
path: root/table.go
Commit message (Collapse)AuthorAge
* Remove internal error log print, throw XML deserialize errorxuri2022-11-13
|
* 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 closes #320, support custom chart axis font stylexuri2022-10-14
|
* 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 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
* Fix potential file corrupted when changing cell value or the col/rowxuri2022-07-16
| | | | | - Remove shared formula subsequent cell when setting the cell values - Support adjust table range when removing and inserting column/row
* 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>
* ref #65, new formula functions: SKEW.P and SLOPE, remove no-required format ↵xuri2022-04-16
| | | | default
* 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 #1122, improve compatibility with LibreOfficexuri2022-01-16
| | | Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces
* Typo fix, rename exported constants, dependencies modules and copyright updatexuri2022-01-09
| | | | Rename exported constants `NameSpaceDublinCoreMetadataIntiative` to `NameSpaceDublinCoreMetadataInitiative`
* ref #65: new formula function PRICExuri2021-11-17
| | | | | - fix COUPPCD result accuracy issue - update close spreadsheet example in documentation and README
* - Support concurrency iterate rows and columnsxuri2021-07-05
| | | | | - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message
* Fixe issue generated file corrupted caused by incorrect default XML ↵xuri2021-04-30
| | | | namespace attributes
* 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
* lint issue fixed and new formula function: ATAN, AVERAGE, AVERAGEA, CONCAT, ↵xuri2021-02-15
| | | | CONCATENATE, COUNT, COUNTBLANK, MAX
* This improves compatibility for worksheet relative XML path and multi rules ↵xuri2021-02-11
| | | | auto filter
* This closes #774, closes #775 and closes #776xuri2021-02-02
| | | | | | | | - correct adjust calculation chain in duplicate rows - correct adjust defined name in the workbook when delete worksheet - use absolute reference in the auto filters defined name to make it compatible with OpenOffice - API `CoordinatesToCellName` have a new optional param to specify if using an absolute reference format - Fix cyclomatic complexity issue of internal function `newFills` and `parseToken`
* Fix #724, standardize variable naming and update unit testsxuri2020-11-11
|
* Update test for addTablexuri2020-07-19
|
* support parse and generate XML element namespace dynamic, fix #651xuri2020-07-18
|
* Update docs and typo fixedxuri2020-06-22
|
* avoid duplicate filter database in workbook defined nameyuemanxilou2020-05-15
|
* Fix #637, improve the compatibility of the auto filter with Office 2007 - 2013xuri2020-05-14
|
* Resolve #570, flat columns for the column's operationxuri2020-02-07
|
* Improve code coverage unit testsxuri2019-12-29
|
* optimization: checking error in unit testsxuri2019-12-24
|
* Improve compatibility, fix workbook's rels ID calc errorxuri2019-12-23
|
* Combine functions:xuri2019-09-16
| | | | | | workBookRelsWriter, drawingRelsWriter into relsWriter; drawingRelsReader, workbookRelsReader, workSheetRelsReader into relsReader; addDrawingRelationships, addSheetRelationships into addRels
* Documentation updated, Go 1.10+ requiredxuri2019-08-11
|
* Fix #424, refactor merged cells adjusterxuri2019-06-12
|
* godoc update and typo fixedxuri2019-04-20
|
* Resolve #369,#370xuri2019-04-15
| | | | | | | | | | | | | | | | | | add error return value exported functions: GetMergeCells ProtectSheet UnprotectSheet UpdateLinkedValue GetMergeCells SetSheetVisible inner functions: workSheetReader copySheet
* refactor: handler error instead of panic,xuri2019-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exported functions: SetCellStyle InsertCol RemoveCol RemoveRow InsertRow DuplicateRow DuplicateRowTo SetRowHeight GetRowHeight GetCellValue GetCellFormula GetCellHyperLink SetCellHyperLink SetCellInt SetCellBool SetCellFloat SetCellStr SetCellDefault GetCellStyle SetCellValue MergeCell SetSheetRow SetRowVisible GetRowVisible SetRowOutlineLevel GetRowOutlineLevel GetRows Columns SearchSheet AddTable GetPicture AutoFilter GetColVisible SetColVisible GetColOutlineLevel SetColOutlineLevel SetColWidth GetColWidth inner functions: adjustHelper adjustMergeCells adjustAutoFilter prepareCell setDefaultTimeStyle timeToExcelTime addDrawingChart addDrawingVML addDrawingPicture getTotalRowsCols checkRow addDrawingShape addTable
* Huge refactorig for consistent col/row numbering (#356)Veniamin Albaev2019-03-20
| | | | | | | | | | | | | | | | | | | * 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
* README updatedxuri2019-01-01
|
* 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
|
* Fixes #256 and format document.xuri2018-08-06
|
* GoDoc updated.xuri2018-07-13
|
* - Add error return value for functions: `AddChart()`, `AddComment()`, ↵xuri2018-05-27
| | | | | | `AddPicture()`, `AddShape()`, `AddTable()` and `SetConditionalFormat()` - go test has been updated
* save bytes on memory instead of stringLunny Xiao2018-05-07
|
* - Set name of table support in `AddTable()`, relate issue #216;Ri Xu2018-05-04
| | | | - godoc and go test has been updated