- Update example code in the documentation
- Update unit tests
- Rename `PictureOptions` to `GraphicOptions`
- Adjust partial options fields data types for the `PictureOptions` and `Shape` structure
- Update dependencies module
- Fix error on inserting columns or rows on the worksheet which contains one cell merged cell range
- Fix getting incomplete rich text cell value in some cases
- Unit tests updated
- 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
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
- 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`
* Support all datatypes for StreamWriter
* Support setting styles with StreamWriter
**NOTE:** This is a breaking change. Values are now explicitly
passed as a []interface{} for simplicity. We also let styles to be
set at the same time.
* Create function to write stream into a table
* Write rows directly to buffer
Avoiding the xml.Encoder makes the streamer faster and use less
memory.
Using the included benchmark, the results went from:
> BenchmarkStreamWriter-4 514 2576155 ns/op 454918 B/op 6592 allocs/op
down to:
> BenchmarkStreamWriter-4 1614 777480 ns/op 147608 B/op 5570 allocs/op
* Use AddTable instead of SetTable
This requires reading the cells after they have been written,
which requires additional structure for the temp file.
As a bonus, we now efficiently allocate only one buffer when
reading the file back into memory, using the same approach
as ioutil.ReadFile.
* Use an exported Cell type to handle inline styles for StreamWriter
* 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