Commit Graph

25 Commits

Author SHA1 Message Date
xuri 94f197c4fe
This improved formula calculate precision and added zero placeholder number format support 2022-03-19 00:05:47 +08:00
xuri 4b64b26c52
Ref: #660, #764, #1093, #1112, #1133 This improve number format support
- Introduced NFP (number format parser) dependencies module
- Initialize custom dates and times number format support
- Dependencies module upgraded
2022-02-13 00:06:30 +08:00
xuri 3ee3c38f9c
Fix file corrupted in some cases, check file extension and format code
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`
2022-01-23 00:48:26 +08:00
xuri 44a13aa402
Export 7 errors so users can act differently on different type of errors 2021-12-07 00:26:53 +08:00
xuri adecf447e1
This closes #1059, represent boolean in XML as 0/1 rather than true/false 2021-11-13 14:11:16 +08:00
xuri 790c363cce This closes #833, closes #845, and closes #1022, breaking changes
- Close spreadsheet and row's iterator required
- New options `WorksheetUnzipMemLimit` have been added
- Improve streaming reading performance, memory usage decrease about 93.7%
2021-09-19 11:06:54 +08:00
xuri c3d1d7dddd
Preserve XML control character in bstrUnmarshal result 2021-08-28 09:23:44 +08:00
xuri c49e7aab30
Reduce cyclomatic complexities for the formula calculate function and update documentation for the API: `MergeCell` and `GetCellValue` 2021-08-09 22:22:43 +08:00
xuri cf9fbafdd8
This closes #979, fix the data validation deletion issue and tidy the internal function in the source code 2021-08-06 22:44:43 +08:00
xuri 2cfcf9eb5f encode the escaped string literal which not permitted in an XML 1.0 document 2021-06-16 15:03:50 +00:00
xuri e354db69b0
string pattern match context check instead of regex lookahead assertion 2021-06-13 11:23:52 +08:00
xuri 5faa36430c
skip XML control character in the escape literal string, and update dependencies 2021-06-12 08:49:18 +08:00
xuri 83e12cc4e5
support escaped string literal basic string and use GitHub Action instead of TravisCI
- Note that: travis-ci.org will shutdown on June 15th, 2021, and I don't have enough permission to migrate this project to travis-ci.com currently
2021-06-11 22:48:37 +08:00
xuri be12cc27f1
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message 2021-05-10 00:09:24 +08:00
xuri 7e429c5b46
Fixe issue generated file corrupted caused by incorrect default XML namespace attributes 2021-04-30 00:14:42 +08:00
xuri 13e7bce6d2
improvement compatibility for the XML ignorable namespace 2020-07-20 00:05:37 +08:00
xuri 0aa1510694
update docs and improve compatibility 2020-07-11 02:31:02 +08:00
xuri 2ae631376b
add limits for total columns, row and filename length 2020-05-29 00:26:40 +08:00
xuri 7f78464f7f
add test for ReadZipReader, close #642 2020-05-23 13:29:51 +08:00
xuri 0f2a905324 Performance improvements 2020-04-05 13:51:00 +08:00
xuri 40ff5dc1a7
refactor: handler error instead of panic,
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
2019-03-23 20:08:06 +08:00
Veniamin Albaev dc01264562 Huge refactorig for consistent col/row numbering (#356)
* 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
2019-03-20 00:14:41 +08:00
Veniamin Albaev 35426ed5dc Tests refactoring
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)
2018-12-27 13:51:44 +03:00
Ri Xu 638bd44dd5
- gofmted with -s;
- Fix ineffectual assignments in Go code;
- Godoc has been updated
2018-01-31 11:12:43 +08:00
mbresson 317ef65381 make SetCellStyle quicker by skipping conversions in checkCellInArea, and skipping area checks when we are sure the cell can't be before or past the current row/col
Signed-off-by: Matthieu Bresson
2018-01-19 17:49:09 +08:00