Skip to content

Commit

Permalink
Upgrade the Excelize library version
Browse files Browse the repository at this point in the history
- Add new fields GapWidth and Overlap in the Chart data type
- Add new field Alignment in the ChartAxis data type
- Move markdown files to .github folder
  • Loading branch information
xuri committed Dec 13, 2024
1 parent 57955f7 commit 1295274
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 36 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
go-version: [1.23.x]
os: [ubuntu-latest]
os: [ubuntu-24.04]
targetplatform: [x64]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -42,12 +42,12 @@ jobs:
GOOS=js GOARCH=wasm GO111MODULE=on go test -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" -v ./... -coverprofile="coverage.txt" -covermode=atomic
- name: Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: ./cmd
file: coverage.txt
files: coverage.txt
flags: unittests
name: codecov-umbrella

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
go-version: [1.23.x]
os: [ubuntu-latest]
os: [ubuntu-24.04]
targetplatform: [x64]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -40,12 +40,12 @@ jobs:
GOOS=js GOARCH=wasm GO111MODULE=on go test -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" -v ./... -coverprofile="coverage.txt" -covermode=atomic
- name: Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: ./cmd
file: coverage.txt
files: coverage.txt
flags: unittests
name: codecov-umbrella

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ init('./node_modules/excelize-wasm/excelize.wasm.gz').then((excelize) => {
console.log(f.error);
return;
}
// 创建一个工作表
// 新建一张工作表
const { index } = f.NewSheet('Sheet2');
// 设置单元格的值
f.SetCellValue('Sheet2', 'A2', 'Hello world.');
Expand Down
16 changes: 8 additions & 8 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ module github.com/xuri/excelize-wasm/cmd
go 1.18

require (
github.com/stretchr/testify v1.8.4
github.com/xuri/excelize/v2 v2.9.1-0.20241109103642-30d3561d0e9b
golang.org/x/image v0.21.0
github.com/stretchr/testify v1.9.0
github.com/xuri/excelize/v2 v2.9.1-0.20241212084348-b53bad35417e
golang.org/x/image v0.23.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/tiendc/go-deepcopy v1.2.0 // indirect
github.com/xuri/efp v0.0.0-20241211021726-c4e992084aa6 // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
32 changes: 16 additions & 16 deletions cmd/go.sum
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00=
github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.1-0.20241109103642-30d3561d0e9b h1:p8MMpT62oX0OiH5mH1pgn8eqmJEQ8OFzhNWSLsvycrg=
github.com/xuri/excelize/v2 v2.9.1-0.20241109103642-30d3561d0e9b/go.mod h1:hqauNt6IfU9wsGCZy/g+pWJMb4tk7KmrgRj8qHDwox0=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tiendc/go-deepcopy v1.2.0 h1:6vCCs+qdLQHzFqY1fcPirsAWOmrLbuccilfp8UzD1Qo=
github.com/tiendc/go-deepcopy v1.2.0/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
github.com/xuri/efp v0.0.0-20241211021726-c4e992084aa6 h1:8m6DWBG+dlFNbx5ynvrE7NgI+Y7OlZVMVTpayoW+rCc=
github.com/xuri/efp v0.0.0-20241211021726-c4e992084aa6/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.1-0.20241212084348-b53bad35417e h1:jQsdgMMXOtbfKlwLUH/O/vbeFaOjfH5b4hq9v8W9Cfo=
github.com/xuri/excelize/v2 v2.9.1-0.20241212084348-b53bad35417e/go.mod h1:BUUJqAS92MYasIroanizqBN1x/8uoGby7IR4BjT0Vnk=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68=
golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY=
golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
41 changes: 36 additions & 5 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ declare module 'excelize-wasm' {
Secondary?: boolean;
Maximum?: number;
Minimum?: number;
Alignment?: Alignment;
Font?: Font;
LogBase?: number;
NumFmt?: ChartNumFmt;
Expand Down Expand Up @@ -572,6 +573,8 @@ declare module 'excelize-wasm' {
ShowBlanksAs?: string;
BubbleSize?: number;
HoleSize?: number;
GapWidth?: number;
Overlap?: number;
};

/**
Expand Down Expand Up @@ -892,18 +895,18 @@ declare module 'excelize-wasm' {
// FirstPageNumber specified the first printed page number. If no value is
// specified, then 'automatic' is assumed.
FirstPageNumber?: number;
// AdjustTo defines the print scaling. This attribute is restricted to
// value ranging from 10 (10%) to 400 (400%). This setting is overridden
// when fitToWidth and/or fitToHeight are in use.
// AdjustTo defines the print scaling. This attribute is restricted to value
// ranging from 10 (10%) to 400 (400%). This setting is overridden when
// fitToWidth and/or fitToHeight are in use.
AdjustTo?: number;
// FitToHeight specified the number of vertical pages to fit on.
FitToHeight?: number;
// FitToWidth specified the number of horizontal pages to fit on.
FitToWidth?: number;
// BlackAndWhite specified print black and white.
BlackAndWhite?: boolean;
// PageOrder specifies the ordering of multiple pages. Values
// accepted: overThenDown, downThenOver
// PageOrder specifies the ordering of multiple pages. Values accepted:
// overThenDown and downThenOver
PageOrder?: string;
};

Expand Down Expand Up @@ -1411,6 +1414,7 @@ declare module 'excelize-wasm' {
* ReverseOrder
* Maximum
* Minimum
* Alignment
* Font
* NumFmt
* Title
Expand All @@ -1425,6 +1429,7 @@ declare module 'excelize-wasm' {
* ReverseOrder
* Maximum
* Minimum
* Alignment
* Font
* LogBase
* NumFmt
Expand Down Expand Up @@ -1458,6 +1463,24 @@ declare module 'excelize-wasm' {
* Minimum: Specifies that the fixed minimum, 0 is auto. The 'Minimum'
* property is optional. The default value is auto.
*
* Alignment: Specifies that the alignment of the horizontal and vertical
* axis. The properties of alignment that can be set are:
*
* TextRotation
* Vertical
*
* The value of 'TextRotation' that can be set from -90 to 90:
*
* The value of 'Vertical' that can be set are:
*
* horz
* vert
* vert270
* wordArtVert
* eaVert
* mongolianVert
* wordArtVertRtl
*
* Font: Specifies that the font of the horizontal and vertical axis. The
* properties of font that can be set are:
*
Expand Down Expand Up @@ -1492,6 +1515,14 @@ declare module 'excelize-wasm' {
* width is 75, and the value should be great than 0 and less or equal than
* 90.
*
* Set the gap with of the column and bar series chart by 'GapWidth'
* property. The 'GapWidth' property is optional. The default width is 150,
* and the value should be great or equal than 0 and less or equal than 500.
*
* Set series overlap of the column and bar series chart by 'Overlap'
* property. The 'Overlap' property is optional. The default width is 0, and
* the value should be great or equal than -100 and less or equal than 100.
*
* combo: Specifies the create a chart that combines two or more chart types
* in a single chart. For example, create a clustered column - line chart
* with data Sheet1!$E$1:$L$15:
Expand Down

0 comments on commit 1295274

Please sign in to comment.