Commit Graph

1253 Commits

Author SHA1 Message Date
xuri 5db716d849
Merge pull request #155 from dolmen-go/deepcopy-with-reflect
CopySheet() using reflect instead of encoding/gob
2018-06-17 21:38:14 +08:00
Olivier Mengué 4a1b406456 CopySheet() using reflect instead of encoding/gob
Use github.com/mohae/deepcopy to deep copy worksheets instead of the
internal deepcopy function that was using encoding/gob serialization and
deserialization.

Rationale:
1/ using `encoding/gob` is much slower than
   [`mohae/deepcopy`](https://github.com/mohae/deepcopy/)
2/ When building an application this implementation of `deepcopy` drags
   the `encoding/gob` package into the binary. And this package is much
   bigger than `mohae/deepcopy` (which only depends on `time` and `reflect`).

```
$ LC_ALL=C stat -f "%6z %N" $(go env GOPATH)/pkg/$(go env GOOS)_$(go env GOARCH)/github.com/mohae/deepcopy.a $(go env GOROOT)/pkg/$(go env GOOS)_$(go env GOARCH)/encoding/gob.a
 10508 .../pkg/darwin_amd64/github.com/mohae/deepcopy.a
541818 .../pkg/darwin_amd64/encoding/gob.a
```
2018-06-14 17:54:31 +02:00
Olivier Mengué 2132de1a08 Extract WriteTo method (see io.WriterTo) to expose bytes written
Extract a WriteTo() method (see io.WriterTo) that exposes the count of bytes
written and rewrite Write() to use it.
2018-06-14 17:00:00 +02:00
Sebastian Willing ccdefb3b16 Documentation:
* Add information about return value of NewSheet()
* Minor documentation language fixes
Samples:
* Added sample go file for dumping a XLSX file to the console
2018-06-11 17:25:28 +02: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 aaced358f1
- Initialize shared formula types support, relate issue #227;
- go test and godoc has been updated
2018-05-26 16:23:15 +08:00
xuri d96440edc4
- Performance optimization 20% faster, 14% memory savings on set cell values;
- Using the canonical syntax in issue template and contributing guide;
- go test has been updated
2018-05-15 21:00:56 +08:00
xuri 167554bfec
Improve unit testing, remove redundant code. 2018-05-14 10:12:46 +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
xuri b5655ce121
Merge pull request #219 from jdevelop/feature/chart-size
Added helper functions to set the chart size.
2018-05-10 09:50:31 +08:00
Eugene Dzhurinsky 1787c3533b Use format string for chart dimension.
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
2018-05-09 08:13:20 -04:00
xuri 18aa606ffe
Merge pull request #221 from srdolor/outline
Added functions to set and get outline level for columns and rows.
2018-05-09 10:40:00 +08:00
Eugene Dzhurinsky e09e47d988 Custom chart size.
Added helper functions to set the chart size.
Added the unit test

Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
2018-05-08 20:21:26 -04:00
xuri e8961f0aff
- Bugfix: set font family not works, relate issue #222;
- Remove useless function `replaceWorkSheetsRelationshipsNameSpace()`;
- Make test cases use strict error checking
2018-05-08 10:36:13 +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 038e34250f
Merge pull request #220 from lunny/lunny/refactor
save bytes on memory instead of string
2018-05-07 16:44:02 +08: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
xuri 761d47f45a
Merge pull request #211 from OloloevReal/master
Added ZoomScale SheetViewOption
2018-05-07 15:50:11 +08:00
xuri 3746ba6a50
Merge pull request #218 from lunny/master
Add iterator method for rows
2018-05-07 15:48:58 +08:00
Lunny Xiao bc451a78de
add iterator method for rows 2018-05-05 13:33:19 +08:00
Ri Xu 934ecec1a9
- Set name of table support in `AddTable()`, relate issue #216;
- godoc and go test has been updated
2018-05-04 11:20:51 +08:00
Ri Xu 200437d778
Fix document typo. 2018-05-03 10:01:41 +08:00
Ri Xu a9c7d6637c
- Support to set the positioning of a picture, relate issue #214;
- go test and godoc has been updated
2018-04-26 11:41:13 +08:00
Ri Xu 9ee57fdb38
Fix typo and adding Chinese version document. 2018-04-23 00:14:58 +08:00
OloloevReal 52eb0ececf Merge branch 'master' of https://github.com/OloloevReal/excelize 2018-04-16 14:05:51 +03:00
OloloevReal b8464af086 Added ZoomScale SheetViewOption
Accessible value between 10 - 400

Used as:
xlsx.SetSheetViewOptions(sheet, 0, excelize.ZoomScale(75))
2018-04-16 14:01:10 +03:00
OloloevReal 9933a49f0e Fixed checking accessible value for ZoomScale, was missed in last commit 2018-04-15 23:14:00 +03:00
OloloevReal 4efc3dd8f0 Added ZoomScale SheetViewOption
Accessible value between 10 - 400

Used as:
xlsx.SetSheetViewOptions(sheet, 0, excelize.ZoomScale(75))
2018-04-15 22:56:47 +03: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 564ebe48dd
- Fix `checkCellInArea()` index out of range when merged cell ref is single coordinate, relate issue #206;
- go test updated;
- Repository icon for SourceTree has been added
2018-04-08 10:31:11 +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 dcbde4b831
- Add categories or values on reverse order (orientation of the chart) support, and set auto or fixed maximum, minimum of the axis, relate issue #202;
- go test and godoc has been updated
2018-03-29 20:17:07 +08:00
Ri Xu 50e3963332
Remove English from the Chinese Readme file. 2018-03-27 21:14:40 +08:00
Ri Xu adce2de927
Add the Chinese version of the README file. 2018-03-27 21:01:07 +08:00
Ri Xu d65b30055d
- Update the function `NewSheet()` to handle when already exists a worksheet of the same name, relate pull request #196;
- go test and godoc has been updated
2018-03-16 20:54:07 +08:00
Ri Xu 770026e956
- New function `SetSheetRow()` has been added for support write whole line at once, relate issue #96 and #194;
- go test and godoc updated;
- Note that this function performance has not been tested
2018-03-12 20:14:39 +08:00
Ri Xu ecc3adf22a
- Add protection properties associated with the cell support, relate issue #191;
- godoc and go test has been updated
2018-03-07 12:56:18 +08:00
Ri Xu 06e54bf1c6
Readme and godoc has been updated. 2018-03-06 10:36:12 +08:00
Ri Xu 45c31c4764
- Update the function `AddChart()`: clustered, stacked and 100% stacked bar and column series charts supported, relate issue #190;
- go test and godoc has been updated
2018-03-05 21:23:52 +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 9d7b94d760
Update godoc to make charts compatibility with WPS, relate issue #187. 2018-02-12 11:45:42 +08:00
Ri Xu 7621927573
- Add a hyperlink to an image support for the function `AddPicture()`, relate issue #185;
- go test and document has been updated.
2018-02-03 15:02:37 +08: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
xuri 12760a7ee6
Merge pull request #184 from martinal/speedup-setcellstyle-more
Speedup `SetCellStyle()` more.
2018-01-29 20:00:39 +08:00
Martin Sandve Alnæs e556c25047 Avoid looping over unused rows and columns in SetCellStyle.
The recent improvement to SetCellStyle still loops
over all the rows before the area, moving the area checks
into the loop is more concise and faster.

Since the loop now covers the correct area by construction,
the inner loop check checkCellInArea is no longer needed.
2018-01-29 12:39:06 +01:00
Ri Xu 6f4e4d9ef1 Revert "The godoc and readme page has been updated."
This reverts commit e4611e9e25.
2018-01-28 13:57:32 +08:00
Ri Xu e4611e9e25
The godoc and readme page has been updated. 2018-01-26 17:17:44 +08:00
xuri 4aadca6db8
Merge pull request #183 from pvelder/182_fix
xlsx.SetCellValue() now supports bool value
2018-01-26 16:53:17 +08:00