Commit Graph

18 Commits

Author SHA1 Message Date
xuri ae2865d923
Improve code coverage unit tests 2019-12-22 00:02:09 +08:00
xuri 5d8365ca17
Fix #529, handle empty inline rich text 2019-12-11 00:02:33 +08:00
xuri 7965e1231b
Resolve #146, make the GetRow function read data as streaming. Ref: #382, #515 2019-11-23 04:13:59 +08:00
xuri 5e418ebd66
Resolve #507, add the new function `DeleteDefinedName` 2019-10-26 20:55:24 +08:00
xuri 87390cdd99
Resolve #511, allow empty columns in the pivot table 2019-10-24 23:18:02 +08:00
Michael 9fe267ffcf Pre-allocate some memory when reading files (#510) 2019-10-24 22:14:33 +08:00
ducquangkstn 866fda2300 fix #503 rows next issue 2019-10-18 14:57:35 +08:00
xuri 2e791fa433 Optimize code of Getting/Setting Page Margins 2019-10-17 00:02:39 +08:00
Harris ac91ca0ded
Only parse xml once when reading
We were parsing the whole sheet twice since the
sheet reader already reads in all the rows.

getTotalRowsCols function is unused after these changes
so it has been deleted as well.

Closes #439
2019-08-05 08:50:45 -05:00
xuri a88459d5f1
add unit tests to functions 2019-04-16 10:57:21 +08:00
xuri f2df344739
Resolve #369,#370
add error return value

exported functions:

GetMergeCells
ProtectSheet
UnprotectSheet
UpdateLinkedValue
GetMergeCells
SetSheetVisible

inner functions:

workSheetReader
copySheet
2019-04-15 11:22:57 +08:00
xuri f0244c0016
Add unit test to improve testing coverage 2019-03-24 13:08:32 +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
caozhiyi b974df402a update go test and function docs 2019-03-07 16:03:31 +08:00
Veniamin Albaev 12c1e2481e Implement consistent row addressing by Excel row number starting with 1 (#350)
* Implement consistent row addressing by Excel row number starting with 1

1. Added second versions for all row manipulation methods with zero-based row addressing.
2. Fixed methods documentation to explicitly describe which row addressing used in method.
3. Added WARNING to README.md.
4. Cosmetic change: All row test moved to file `rows_test.go`.

* TravisCI: go1.12 added to tests matrix

* BACKWARD INCOMPARTIBLE: Use only Excel numbering logic from 1 row

* README updated
2019-03-06 21:40:45 +08:00
Ri Xu 3ca180f09c
Merge test cases and use strict error checking. 2018-05-07 16:14:35 +08:00
Lunny Xiao bc451a78de
add iterator method for rows 2018-05-05 13:33:19 +08:00