strong
c62ced7ca7
fix getRowHeight actually get the height of the next row ( #860 )
2021-06-13 14:42:09 +08:00
xuri
bffb5d6b41
make the caller of `getRowHeight` function adapt row number change, update comment: use rows number instead of rows index.
2021-06-13 14:38:01 +08:00
xuri
d932e62a12
This closes #855 , fix missing formula cell when getting rows value
2021-06-05 00:06:14 +08:00
william
2f74ec171d
fix the bug when there was no count attribute in sharedStrings file
2021-05-24 15:27:36 +08:00
xuri
5bf3ea6154
This closes #842 , avoid empty rows in the tail of the worksheet
2021-05-16 00:03:09 +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
f8f699a172
Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMEXP, IMLN and IMLOG10
2021-04-04 15:29:43 +08:00
xuri
2af96c0714
#65 fn: N, PERCENTILE.INC and T
...
typo fixed
2021-03-30 23:02:22 +08:00
xuri
36b7990d6b
lint issue fixed and new formula function: ATAN, AVERAGE, AVERAGEA, CONCAT, CONCATENATE, COUNT, COUNTBLANK, MAX
2021-02-15 00:09:35 +08:00
xuri
30549c5e90
fix custom row height check issue
2021-02-08 18:05:15 +08:00
xuri
2fb135bc94
handle end element event in the worksheet row/column iterator XML SAX parser
2021-02-05 22:52:31 +08:00
xuri
b84bd1abc0
new formula fn: IF, LEN; not equal operator support and faster numeric precision process
2021-01-27 13:51:47 +08:00
xuri
1bc5302007
Fixed #764 , add a condition for round precision
2021-01-20 00:14:21 +08:00
xuri
576bfffbe6
This closes #752 , fix incorrectly merged cells on duplicate row, and new formula function: LOWER, PROPER, UPPER
2020-12-22 01:48:52 +00:00
xuri
599a8cb0bc
Fixed #727 , rounding numeric with precision for formula calculation
2020-11-19 21:38:35 +08:00
xuri
92c8626f81
Fixed #732 , support single line with repeated row element in the sheet data
2020-11-18 22:08:40 +08:00
Eugene Androsov
2be4bfd410
Fix row duplicate mechanism ( #729 )
2020-11-15 10:58:45 +08:00
xuri
2514bb16c6
Fix #724 , standardize variable naming and update unit tests
2020-11-11 01:03:56 +08:00
xuri
5dd0b4aec2
using POSIX directory separator in zip path with Windows
2020-11-06 20:03:13 +08:00
xuri
cdc57db3b3
Fix race conditions
2020-11-04 01:24:26 +00:00
xuri
c82a185af8
Compatibility improvement: parse document core part (workbook) dynamically
2020-11-04 00:28:20 +08:00
Artem Kustikov
f2b8798a34
extend cell value load to support custom datetime format ( #703 )
...
* 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>
2020-10-04 21:07:39 +08:00
xuri
324f87bcae
add checking and limits for the worksheet
2020-09-18 22:20:58 +08:00
xuri
88de2f8d51
Default row height compatibility with Apache OpenOffice and Kingsoft WPS, unit test update and typo fixed
2020-08-22 18:58:43 +08:00
xuri
c3e92a51d7
Compatible with Go 1.15, fix unit test failed on Windows and fixed #689 potential race condition
2020-08-15 09:19:35 +00:00
xuri
c922c32fb7
support parse and generate XML element namespace dynamic, fix #651
2020-07-18 15:15:16 +08:00
xuri
820a314cfb
Resolve #667 , support shared string table without unique count
2020-07-15 23:32:00 +08:00
xuri
49257c5918
support case-sensitive doc parts to improve compatibility
2020-07-09 01:24:11 +08:00
xuri
f7bd0729c6
Resolve #32 , fix missing leading/leading spaces when working with SST
2020-07-01 22:41:29 +08:00
xuri
1cbb05d497
GetCols support the row element without r attribute in the worksheet
2020-06-28 00:02:32 +08:00
xuri
48f19f60aa
support the row element without r attribute in the worksheet
2020-06-27 00:02:47 +08:00
xuri
15fd56853f
Update docs and typo fixed
2020-06-22 00:14:56 +08:00
xuri
5221729bc3
make columns iterator read cell streamingly and add max column limit on ColumnNumberToName
2020-06-22 00:05:19 +08:00
xuri
c168233e70
speedup get cell value from shared string table
2020-05-27 00:02:29 +08:00
xuri
5c99300ee4
Fix #622 , storage string to SST (shared string table)
2020-05-26 02:09:39 +08:00
xuri
98221a332f
Merge pull request #410
2020-05-17 17:36:53 +08:00
xuri
2285d4dc71
handle the cell without r attribute in a row element
2020-04-24 08:26:16 +08:00
xuri
0f2a905324
Performance improvements
2020-04-05 13:51:00 +08:00
foxmeder
59f6af21a3
fix reading wrong string from xml such as below
...
<sheetData><row r="1"><c r="A1" s="1" t="s"><v>0</v></c><c r="B1" s="1" t="s"></c></row></sheetData>
2020-04-02 00:49:09 +08:00
xuri
3f89c6e979
remove ineffectual variable assignments and simplify code
2020-03-29 18:44:24 +08:00
xxb-at-julichina
386a42dfa2
Update rows.go
2020-02-28 15:53:04 +08:00
xuri
8b20ea1685
Fix #586 , duplicate row with merged cells
2020-02-25 00:19:22 +08:00
xuri
ad883caa0f
Resolve #580 , revert commit 5ca7231ed4
2020-02-19 00:08:10 +08:00
xuri
5ca7231ed4
optimize code and comments: use println errors instead of panic
2020-01-03 23:57:25 +08:00
xuri
5f5ec76740
Fix #551 , handle empty rows in streaming reading
2019-12-31 01:01:16 +08:00
xuri
09485b3f9f
Improve code coverage unit tests
2019-12-29 16:02:31 +08:00
match-meng
7358dca436
Update comments for the xmlNewDecoder ( #542 )
2019-12-20 22:22:56 +08:00
xuri
4249dad8ea
Resolve #539 Merge branch 'v2'
...
# Conflicts:
# rows.go
# sheet.go
2019-12-20 01:00:15 +08:00
Alex Geer
b1b3c0d151
Fix #539 Fixed error opening excel file created in encoding d… ( #540 )
...
* Fixed issue #539 Fixed error opening excel file created in encoding different from UTF-8, added logging of possible errors when decoding XML if the function does not provide exit with an error
* Added test for CharsetReader
* Fixed #discussion_r359397878
Discussion: https://github.com/360EntSecGroup-Skylar/excelize/pull/540#discussion_r359397878
* Fixed go fmt
* go mod tidy and removed unused imports
* The code has been refactored
2019-12-20 00:30:48 +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
ducquangkstn
866fda2300
fix #503 rows next issue
2019-10-18 14:57:35 +08:00
xuri
a34d3b8c86
Compatibility improvement
2019-09-24 21:53:19 +08:00
xuri
9c70d0ac86
Documentation updated, Go 1.10+ required
2019-08-11 00:36:14 +08:00
Harris
acd76425c2
Handle multi row inline strings
...
The inline string struct is actually the same
as the shared strings struct, reuse it.
Note that Go version 1.10 is required.
Fixes #462
2019-08-09 08:12:08 -05:00
Harris
e07581e980
Further improve read performance
...
Instead of re-encoding the full sheet to change the namespaces
in the encoded bytes, read the sheet again and do the byte
replacements there.
In this case, file access ends up being more performant than
marshaling the sheet back to XML.
In the SharedStrings test, ensure the strings are actually read.
Fix #439
2019-08-07 08:06:40 -05: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
9f8623047d
Optimize code, fix golint issues
2019-06-20 00:00:40 +08:00
xuri
821632cf89
Fix #424 , refactor merged cells adjuster
2019-06-12 08:10:33 +08:00
xuri
421f945f51
Fixed #418 , #420 , #421 , init adjust calculation chain support
...
Update testing case
2019-06-08 00:00:55 +08:00
xuri
0660f30cdd
godoc update and typo fixed
2019-04-20 14:57:50 +08:00
Michael
0f9170a03b
Resolve #382 , rewrite prepareSheetXML to scale linearly ( #383 )
...
* Rewrite prepareSheetXML to scale linearly
We don't need to backfill columns into every row for most purposes
Provided makeContiguousColumns for setting styles where we do
need it for a specific region.
Added a benchmark to monitor progress. For 50,000 rows this went
from about 11 seconds to 1 second. The improvements are more
dramatic as the row/column count increases.
* Assigning that row value was redundant
2019-04-16 14:50:16 +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
4e7d93a777
Resolve #377 , avoid empty column in GetRows result
2019-04-07 14:04:41 +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
7d197c6d89
Fixed PR #356 regression RemoveCol() broken ( #365 )
2019-03-21 18:44:30 +08:00
xuri
beff7b4f3c
Typo fixed and godoc updated
2019-03-20 15:13:41 +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
Kimxu
164a3e126a
update README and functions docs ( #351 )
...
* update README and functions docs
* update README and functions docs
2019-03-07 15:13:32 +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
xuri
0072bb7310
resolve the issue corrupted xlsx after deleting formula of cell, reference #346
2019-02-22 22:17:38 +08:00
Veniamin Albaev
725c1a0c40
New feature: File.DuplicateRowTo() duplicate row to specified row position.
...
DuplicateRowTo() is similar to DuplicateRow() but copies specified row not just after specified source row
but to any other specified position below or above source row.
Also I made minor modifications of tests: using filepath.Join() instead of direct unix-way paths strings
to avoid possible tests fails on other OS.
2019-01-10 14:29:19 +03:00
Rafael Barros
dea7ba0ec4
Fixes #195 : Make GetRows return value avoid empty cell
...
* #195 : proposed resolution to the issue
* Make GetRows return value avoid empty cell
* Update test file to fix broken testing.
2019-01-01 18:18:42 +08:00
xuri
fabd9d013f
README updated
2019-01-01 13:20:14 +08:00
Veniamin Albaev
7b7ca99f5d
Duplicate row ( #317 )
...
* go mod tidy applied
* File.DuplicateRow() method added
2018-12-26 13:33:40 +08:00
xuri
90bdd3632f
Fix the issue caused by missing tradition to strict conversion for `sharedStringsReader()`, relate issue #276
2018-10-18 10:23:08 +08:00
xuri
3e004d900b
Comments style changed.
2018-09-14 00:58:48 +08:00
xuri
13a9769cc5
Comments style changed.
2018-09-14 00:44:23 +08:00
xuri
2f146c923c
Comments style changed.
2018-09-14 00:35:47 +08:00
xuri
b4a6e61ec3
Fix golint errors under confidence 0.1
2018-09-12 15:47:56 +08:00
xuri
ec37b114c3
Fixes #256 and format document.
2018-08-06 10:21:24 +08:00
xuri
9e463b4614
- Add error return value for functions: `AddChart()`, `AddComment()`, `AddPicture()`, `AddShape()`, `AddTable()` and `SetConditionalFormat()`
...
- go test has been updated
2018-05-27 11:25:55 +08:00
xuri
eb62256d16
Simplify testing code, add test case for outline functions and update the godoc.
2018-05-11 10:14:18 +08:00
Ilya Kuznetsov
e70618d084
Added functions to set and get outline level for columns and rows.
2018-05-07 21:47:31 +03:00
xuri
d04be7b33d
Merge branch 'master' into lunny/refactor
2018-05-07 16:42:30 +08:00
Ri Xu
3ca180f09c
Merge test cases and use strict error checking.
2018-05-07 16:14:35 +08:00
Lunny Xiao
38ad20efc1
save bytes on memory instead of string
2018-05-07 16:12:51 +08:00
Lunny Xiao
bc451a78de
add iterator method for rows
2018-05-05 13:33:19 +08:00
Ri Xu
9ee57fdb38
Fix typo and adding Chinese version document.
2018-04-23 00:14:58 +08:00
Ri Xu
2b97c3bb46
- Support to read inlineStr type cell value, relate issue #208 , PR #209 ;
...
- go test and godoc has been updated
2018-04-09 19:44:08 +08:00
Ri Xu
a6fc5a721d
- Make row index consistent in function `SetRowHeight` and `GetRowHeight`, fix issue #205 ;
...
- go test and godoc has been updated
2018-04-02 10:59:15 +08:00
Ri Xu
b1b056e0eb
Handle special shared string table file name `xl/SharedStrings.xml`, relate issue #188
2018-03-02 10:19:40 +08:00
Ri Xu
6dc135a992
Fix read columns count wrong in specific xlsx data, relate issue #175
2018-01-06 08:05:43 +08:00
Ri Xu
ebafbdde73
Bugfix: use sheet name in func `AddChat`, relate issue #138
...
Signed-off-by: Ri Xu <xuri.me@gmail.com>
2017-10-20 14:40:57 +08:00
Ri Xu
8077732dff
Bugfix: read sheet name error, relate issue #137
...
Signed-off-by: Ri Xu <xuri.me@gmail.com>
2017-10-18 19:07:35 +08:00
Ri Xu
9b5b74d480
Performance optimization, use the array index instead of the value in range.
2017-10-16 10:42:43 +08:00
Ri Xu
905be463ed
Improve code readability.
2017-09-30 17:07:59 +08:00
Ri Xu
f05f799f8d
- API changed, use worksheet name instead of "sheet" + index, related issue #25 , #43 , #47 , #51 , #89 , #101 , #116 and #120 .
...
- go test updated
2017-09-13 22:00:33 +08:00
Ri Xu
6aa59a1af2
- Init insert/remove column/row support. Relate issue #77 and #82 ;
...
- Readme and go test updated
2017-07-24 10:26:02 +08:00