gridjs-spreadsheet 25.5.0 → 25.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ae125bc972519a804601f2ead209255c.svg +914 -0
- package/example/Dockerfile +7 -10
- package/example/README.md +329 -44
- package/example/pom.xml +2 -2
- package/example/src/main/java/com/aspose/gridjs/demo/MyConfig.java +9 -0
- package/example/src/main/java/com/aspose/gridjs/demo/controller/GridJs2Controller.java +9 -9
- package/example/src/main/resources/application.properties +7 -3
- package/example/src/main/resources/static/xspread/555f60323063f2b68b6eac7ce9c45b19.svg +88 -0
- package/example/src/main/resources/templates/fileFromUpload.html +18 -17
- package/example/src/main/resources/templates/index.html +1 -1
- package/package.json +1 -1
- package/readme.md +4 -53
- package/xspreadsheet.css +134 -7
- package/xspreadsheet.js +5 -5
- package/example/src/main/resources/static/xspread/content/img/20130527034914143.gif +0 -0
- package/example/src/main/resources/static/xspread/content/img/20130527034914229.gif +0 -0
- package/example/src/main/resources/static/xspread/content/img/20130527034916363.gif +0 -0
- package/example/src/main/resources/static/xspread/content/img/20130527034917946.gif +0 -0
- package/example/src/main/resources/static/xspread/content/img/20130527034918372.gif +0 -0
- package/preview.gif +0 -0
- /package/{a3b683289420fd8ec937908397907279.svg → example/src/main/resources/static/xspread/a3b683289420fd8ec937908397907279.svg} +0 -0
package/example/Dockerfile
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
FROM maven:3.8.6-amazoncorretto-17 AS build
|
|
2
|
-
#
|
|
2
|
+
# 设置工作目录
|
|
3
3
|
WORKDIR /usr/src/app
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# �����ص� Maven �����ļ��ͻ������������ļ����Ƶ�������
|
|
5
|
+
# 将本地的 Maven 设置文件和环境变量设置文件复制到容器中
|
|
9
6
|
COPY .mvn .mvn
|
|
10
7
|
COPY pom.xml .
|
|
11
8
|
COPY src src
|
|
12
|
-
|
|
9
|
+
|
|
13
10
|
RUN ls -l *
|
|
14
|
-
#
|
|
11
|
+
# 使用 Maven 构建应用
|
|
15
12
|
RUN mvn package -DskipTests
|
|
16
13
|
|
|
17
14
|
FROM eclipse/ubuntu_jdk8
|
|
18
15
|
WORKDIR /app
|
|
19
|
-
#
|
|
16
|
+
# 将构建的 jar 文件复制到新的容器中
|
|
20
17
|
COPY --from=build /usr/src/app/target/*.jar /app/app.jar
|
|
21
18
|
|
|
22
19
|
|
|
23
20
|
# web port
|
|
24
21
|
EXPOSE 8080
|
|
25
|
-
# Install Fonts because the SDK image contains very few fonts. The command copies font files from local to docker image. Make sure you have a local
|
|
22
|
+
# Install Fonts because the SDK image contains very few fonts. The command copies font files from local to docker image. Make sure you have a local “fonts” directory that contains all the fonts you need to install. In this example, the local “fonts” directory is put in the same directory as the Dockerfile.
|
|
26
23
|
# COPY fonts/* /usr/share/fonts/
|
|
27
24
|
RUN mkdir -p /app/wb
|
|
28
25
|
RUN mkdir -p /app/grid_cache/streamcache
|
|
29
26
|
RUN mkdir -p /app/upload
|
|
30
27
|
COPY wb/*.xlsx /app/wb/
|
|
31
28
|
# RUN ls -l /app/
|
|
32
|
-
#
|
|
29
|
+
# 启动应用
|
|
33
30
|
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/app.jar"]
|
package/example/README.md
CHANGED
|
@@ -1,71 +1,356 @@
|
|
|
1
|
-
|
|
1
|
+
# gridjs-spreadsheet
|
|
2
|
+
|
|
3
|
+
> this is the client side script for GridJs which is a lightweight, scalable, and customizable toolkit that provides cross-platform web applications, enables convenient development for editing or viewing Excel/Spreadsheet files, offers simple deployment, and provides easy-to-use APIs
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
- [API](#api)
|
|
6
|
+
- [Preview](#preview)
|
|
7
|
+
- [Github Demos](#github-demos)
|
|
8
|
+
- [Features](#features)
|
|
9
|
+
- [Documentation](#documentation)
|
|
10
|
+
- [Support](#support)
|
|
11
|
+
- [License](#license)
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
## About
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
It allows you to view and edit spreadsheet files with ease.
|
|
16
|
+
|
|
17
|
+
this is developed based on https://github.com/myliang/x-spreadsheet
|
|
18
|
+
|
|
19
|
+
Quick online demo: https://products.aspose.app/cells/editor
|
|
9
20
|
|
|
10
21
|
## Preview
|
|
11
22
|
|
|
12
|
-
|
|
23
|
+
<img alt='demo' src='https://unpkg.com/gridjs-spreadsheet@25.1.0/preview.gif' />
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## API
|
|
27
|
+
|
|
28
|
+
APIs are available on the [API page](https://docs.aspose.com/cells/net/aspose-cells-gridjs/how-to-use-gridjs-client-api/).
|
|
29
|
+
|
|
30
|
+
## CDN
|
|
31
|
+
```html
|
|
32
|
+
<head>
|
|
33
|
+
<!-- other dependency start -->
|
|
34
|
+
<link rel="stylesheet" href="https://unpkg.com/bootstrap@5.2.3/dist/css/bootstrap.min.css">
|
|
35
|
+
<link rel="stylesheet" href="https://unpkg.com/jquery-ui@1.13.2/dist/themes/ui-lightness/jquery-ui.min.css">
|
|
36
|
+
<script src="https://unpkg.com/jquery@3.6.0/dist/jquery.min.js"></script>
|
|
37
|
+
<script src="https://unpkg.com/jquery-ui@1.13.2/dist/jquery-ui.min.js"></script>
|
|
38
|
+
<script src="https://unpkg.com/jszip@3.10.1/dist/jszip.min.js"></script>
|
|
39
|
+
<!-- other dependency end -->
|
|
40
|
+
<link rel="stylesheet" href="https://unpkg.com/gridjs-spreadsheet/xspreadsheet.css">
|
|
41
|
+
<script src="https://unpkg.com/gridjs-spreadsheet/xspreadsheet.js"></script>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
const option = {
|
|
45
|
+
updateMode: 'server',
|
|
46
|
+
updateUrl: '/GridJs2/UpdateCell',
|
|
47
|
+
showToolbar: true,
|
|
48
|
+
//mode: 'edit' or 'read'
|
|
49
|
+
mode: 'read',
|
|
50
|
+
//support multiple language ,the locale is:en, cn, es, pt, de, ru, nl, ar, fr,id,it,ja, ko,th,tr,vi,cht
|
|
51
|
+
local: 'en',
|
|
52
|
+
};
|
|
53
|
+
const sheetstr="[{\"name\":\"Sheet1\",\"sheetid\":\"s0\",\"showGrid\":true,\"sprotected\":false,\"canselectlocked\":true,\"displayRight2Left\":false,\"canselectunlocked\":true,\"styles\":[{\"textwrap\":true,\"color\":\"#000000\",\"valign\":\"middle\",\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"italic\":false}},{\"textwrap\":false,\"color\":\"#000000\",\"valign\":\"middle\",\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"italic\":false}}],\"cols\":{\"0\":{\"width\":72},\"1\":{\"width\":72},\"2\":{\"width\":532},\"3\":{\"width\":72},\"4\":{\"width\":72},\"5\":{\"width\":72},\"6\":{\"width\":72},\"7\":{\"width\":72},\"8\":{\"width\":72},\"9\":{\"width\":72},\"10\":{\"width\":72},\"11\":{\"width\":72},\"12\":{\"width\":72},\"13\":{\"width\":72},\"14\":{\"width\":72},\"15\":{\"width\":72},\"len\":16},\"rows\":{\"3\":{\"height\":122,\"cells\":{\"2\":{\"text\":\"FFF呜呜呜\\n呜我 我我我我\\nnice wwwwww\\nexample work 测的的的的的的的到\\n到手 一级 一季报 击败发发发发发发发发发发发\",\"style\":0,\"rtxt\":[{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"F\"},{\"font\":{\"name\":\"arial\",\"size\":18,\"bold\":false,\"color\":\"#953735\",\"italic\":false},\"txt\":\"FF呜\"},{\"font\":{\"name\":\"arial\",\"size\":18,\"bold\":false,\"color\":\"#953735\",\"underline\":\"single\",\"italic\":false},\"txt\":\"呜\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"underline\":\"single\",\"italic\":false},\"txt\":\"呜\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"\\n呜\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#0070C0\",\"italic\":false},\"txt\":\"我 我我\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"我我\\nni\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":true,\"color\":\"#C00000\",\"italic\":true},\"txt\":\"ce wwwwww\\nexample\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\" work \"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#C0504D\",\"italic\":false},\"txt\":\"测的的的\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#C0504D\",\"underline\":\"double\",\"italic\":false},\"txt\":\"的的\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"underline\":\"double\",\"italic\":false},\"txt\":\"的\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"的到\\n到手 \"},{\"font\":{\"name\":\"arial\",\"size\":18,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"一级 一季\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"报 击败发\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#9BBB59\",\"italic\":false},\"txt\":\"发发发发发发\"},{\"font\":{\"name\":\"arial\",\"size\":11,\"bold\":false,\"color\":\"#000000\",\"italic\":false},\"txt\":\"发发发发\"}],\"html\":\"<Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">F</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 18pt;COLOR: #953735;\\\">FF呜</Font><Font Style=\\\"TEXT-DECORATION: underline;FONT-FAMILY: arial;FONT-SIZE: 18pt;COLOR: #953735;\\\">呜</Font><Font Style=\\\"TEXT-DECORATION: underline;FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">呜</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\"><Br>呜</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #0070c0;\\\">我 我我</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">我我<Br>ni</Font><Font Style=\\\"FONT-WEIGHT: bold;FONT-STYLE: italic;FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #c00000;\\\">ce wwwwww<Br>example</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\"> work </Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #c0504d;\\\">测的的的</Font><Font Style=\\\"TEXT-DECORATION: underline;FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #c0504d;\\\">的的</Font><Font Style=\\\"TEXT-DECORATION: underline;FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">的</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">的到<Br>到手 </Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 18pt;COLOR: #000000;\\\">一级 一季</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">报 击败发</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #9bbb59;\\\">发发发发发发</Font><Font Style=\\\"FONT-FAMILY: arial;FONT-SIZE: 11pt;COLOR: #000000;\\\">发发发发</Font>\"},\"4\":{\"text\":\"\",\"style\":1}}},\"len\":13,\"height\":19}},{\"name\":\"Sheet2\",\"sheetid\":\"s1\",\"showGrid\":true,\"sprotected\":false,\"canselectlocked\":true,\"displayRight2Left\":false,\"canselectunlocked\":true,\"cols\":{\"0\":{\"width\":72},\"1\":{\"width\":72},\"2\":{\"width\":72},\"3\":{\"width\":72},\"4\":{\"width\":72},\"5\":{\"width\":72},\"6\":{\"width\":72},\"7\":{\"width\":72},\"8\":{\"width\":72},\"9\":{\"width\":72},\"10\":{\"width\":72},\"11\":{\"width\":72},\"12\":{\"width\":72},\"13\":{\"width\":72},\"14\":{\"width\":72},\"15\":{\"width\":72},\"len\":16},\"rows\":{\"12\":{\"height\":19,\"cells\":{\"15\":{\"text\":\"\"}}},\"len\":13,\"height\":19}},{\"name\":\"Sheet3\",\"sheetid\":\"s2\",\"showGrid\":true,\"sprotected\":false,\"canselectlocked\":true,\"displayRight2Left\":false,\"canselectunlocked\":true,\"cols\":{\"0\":{\"width\":72},\"1\":{\"width\":72},\"2\":{\"width\":72},\"3\":{\"width\":72},\"4\":{\"width\":72},\"5\":{\"width\":72},\"6\":{\"width\":72},\"7\":{\"width\":72},\"8\":{\"width\":72},\"9\":{\"width\":72},\"10\":{\"width\":72},\"11\":{\"width\":72},\"12\":{\"width\":72},\"13\":{\"width\":72},\"14\":{\"width\":72},\"15\":{\"width\":72},\"len\":16},\"rows\":{\"12\":{\"height\":19,\"cells\":{\"15\":{\"text\":\"\"}}},\"len\":13,\"height\":19}}]";
|
|
54
|
+
xs = x_spreadsheet('#gridjs-demo', option).loadData(JSON.parse(sheetstr)).change((cdata) => {
|
|
55
|
+
console.log(cdata);
|
|
56
|
+
console.log(xs.validate());
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<div id="gridjs-demo"></div>
|
|
62
|
+
</body>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## NPM
|
|
66
|
+
|
|
67
|
+
```shell
|
|
68
|
+
npm install gridjs-spreadsheet
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<div id="gridjs-demo"></div>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
//includ all the dependencies
|
|
77
|
+
//Including jszip
|
|
78
|
+
import JSZip from 'jszip';
|
|
79
|
+
window.JSZip = JSZip;
|
|
80
|
+
//Including jQuery
|
|
81
|
+
import $ from 'jquery';
|
|
82
|
+
window.$ = $;
|
|
83
|
+
//Including gridjs-spreadsheet
|
|
84
|
+
import 'gridjs-spreadsheet/xspreadsheet.css';
|
|
85
|
+
import Spreadsheet from "gridjs-spreadsheet";
|
|
13
86
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
87
|
+
// If you need to override the default options, you can set the override
|
|
88
|
+
// const options = {};
|
|
89
|
+
// new Spreadsheet('#gridjs-demo', options);
|
|
90
|
+
const s = new Spreadsheet("#gridjs-demo")
|
|
91
|
+
.loadData({}) // load data
|
|
92
|
+
.change(data => {
|
|
93
|
+
// save data to db
|
|
94
|
+
});
|
|
19
95
|
|
|
20
|
-
|
|
21
|
-
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## simple usage
|
|
22
101
|
|
|
23
|
-
|
|
24
|
-
|
|
102
|
+
```javascript
|
|
103
|
+
|
|
104
|
+
// If you need to override the default options, you can set the override
|
|
105
|
+
const option = {
|
|
106
|
+
updateMode: 'server',
|
|
107
|
+
updateUrl: '/GridJs2/UpdateCell',
|
|
108
|
+
showToolbar: true,
|
|
109
|
+
//mode: 'edit' or 'read'
|
|
110
|
+
mode: 'read',
|
|
111
|
+
//support multiple language ,the locale is:en, cn, es, pt, de, ru, nl, ar, fr,id,it,ja, ko,th,tr,vi,cht
|
|
112
|
+
local: 'en',
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
xs = x_spreadsheet('#gridjs-demo', option).loadData(sheets).change((cdata) => {
|
|
116
|
+
console.log(cdata);
|
|
117
|
+
|
|
118
|
+
}
|
|
25
119
|
|
|
26
|
-
|
|
27
|
-
testconfig.AsposeLicensePath=/app/license
|
|
120
|
+
|
|
28
121
|
```
|
|
29
|
-
###2.run src\main\java\com\aspose\gridjs\demo\GridjsdemoApplication.java
|
|
30
122
|
|
|
31
|
-
|
|
123
|
+
```javascript
|
|
124
|
+
// default options
|
|
125
|
+
{
|
|
126
|
+
mode: 'edit', // edit | read
|
|
127
|
+
showToolbar: true,
|
|
128
|
+
showGrid: true,
|
|
129
|
+
showContextmenu: true,
|
|
130
|
+
view: {
|
|
131
|
+
height: () => document.documentElement.clientHeight,
|
|
132
|
+
width: () => document.documentElement.clientWidth,
|
|
133
|
+
},
|
|
134
|
+
row: {
|
|
135
|
+
len: 100,
|
|
136
|
+
height: 25,
|
|
137
|
+
},
|
|
138
|
+
col: {
|
|
139
|
+
len: 26,
|
|
140
|
+
width: 100,
|
|
141
|
+
indexWidth: 60,
|
|
142
|
+
minWidth: 60,
|
|
143
|
+
},
|
|
144
|
+
style: {
|
|
145
|
+
bgcolor: '#ffffff',
|
|
146
|
+
align: 'left',
|
|
147
|
+
valign: 'middle',
|
|
148
|
+
textwrap: false,
|
|
149
|
+
strike: false,
|
|
150
|
+
underline: false,
|
|
151
|
+
color: '#0a0a0a',
|
|
152
|
+
font: {
|
|
153
|
+
name: 'Helvetica',
|
|
154
|
+
size: 10,
|
|
155
|
+
bold: false,
|
|
156
|
+
italic: false,
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
}
|
|
160
|
+
```
|
|
32
161
|
|
|
33
|
-
|
|
162
|
+
|
|
34
163
|
|
|
35
|
-
|
|
164
|
+
## Bind events
|
|
165
|
+
```javascript
|
|
166
|
+
// single selection
|
|
167
|
+
xs.on('cell-selected', (cell, ri, ci) => {});
|
|
168
|
+
// range selection
|
|
169
|
+
xs.on('cells-selected', (cell, { sri, sci, eri, eci }) => {});
|
|
170
|
+
// shape/image selection
|
|
171
|
+
xs.on('object-selected', (obj) => { console.log('obj id:', obj.id, ', type: ', obj.type); })
|
|
172
|
+
// edited on cell
|
|
173
|
+
xs.on('cell-edited', (text, ri, ci) => {});
|
|
174
|
+
// cells updated
|
|
175
|
+
xs.on('cells-updated', (name, cells) => {
|
|
176
|
+
console.log('cells updated for sheet name:', name);
|
|
177
|
+
cells.forEach((acell, index, array) => {
|
|
178
|
+
console.log('acell got updated:', acell);
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
// cells deleted
|
|
182
|
+
xs.on('cells-deleted', (range) => {
|
|
183
|
+
console.log('cells deleted :', range);
|
|
184
|
+
})
|
|
185
|
+
// rows deleted
|
|
186
|
+
xs.on('rows-deleted', (ri, n) => {
|
|
187
|
+
console.log('rows-deleted :', ri, ",size", n);
|
|
188
|
+
})
|
|
189
|
+
// columns deleted
|
|
190
|
+
xs.on('columns-deleted', (ci, n) => {
|
|
191
|
+
console.log('columns-deleted :', ci, ",size", n);
|
|
192
|
+
})
|
|
193
|
+
// rows inserted
|
|
194
|
+
xs.on('rows-inserted', (ri, n) => {
|
|
195
|
+
console.log('rows-inserted :', ri, ",size", n);
|
|
196
|
+
})
|
|
197
|
+
// columns inserted
|
|
198
|
+
xs.on('columns-inserted', (ci, n) => {
|
|
199
|
+
console.log('columns-inserted :', ci, ",size", n);
|
|
200
|
+
})
|
|
36
201
|
|
|
37
|
-
|
|
202
|
+
```
|
|
38
203
|
|
|
39
|
-
|
|
40
|
-
|
|
204
|
+
## update cell-text
|
|
205
|
+
```javascript
|
|
206
|
+
|
|
207
|
+
// cellText(ri, ci, text, sheetIndex = 0)
|
|
208
|
+
xs.cellText(5, 5, 'xxxx',0).cellText(6, 5, 'yyy',0).reRender();
|
|
41
209
|
```
|
|
42
210
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
211
|
+
## get cell and cell-style
|
|
212
|
+
```javascript
|
|
213
|
+
|
|
214
|
+
// cell(ri, ci, sheetIndex = 0)
|
|
215
|
+
xs.cell(ri, ci);
|
|
216
|
+
// cellStyle(ri, ci, sheetIndex = 0)
|
|
217
|
+
xs.cellStyle(ri, ci);
|
|
47
218
|
```
|
|
48
|
-
|
|
49
|
-
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
## Features
|
|
222
|
+
|
|
223
|
+
- Localization/Multiple language UI
|
|
224
|
+
- Paint format
|
|
225
|
+
- Clear format
|
|
226
|
+
- Format
|
|
227
|
+
- Number Format
|
|
228
|
+
- Font/Font size/ bold/italic/Underline/Strike
|
|
229
|
+
- Highlight
|
|
230
|
+
- Shape/Image resize/rotate/position ajustment
|
|
231
|
+
- Text color/Align/wrapping
|
|
232
|
+
- Fill color
|
|
233
|
+
- RichText
|
|
234
|
+
- Borders
|
|
235
|
+
- Merge cells
|
|
236
|
+
- Freeze cell
|
|
237
|
+
- Copy, Cut, Paste
|
|
238
|
+
- Autofill
|
|
239
|
+
- Insert/Delete row, column
|
|
240
|
+
- Filter row, column
|
|
241
|
+
- Zoom in/out
|
|
242
|
+
- Sort
|
|
243
|
+
- Search
|
|
244
|
+
- Formula
|
|
245
|
+
- Resize row-height, col-width
|
|
246
|
+
- Switch/add/delete sheets
|
|
247
|
+
- Condition Format
|
|
248
|
+
- Comment
|
|
249
|
+
- Add/delete Links
|
|
250
|
+
- Print
|
|
251
|
+
- Data validations
|
|
252
|
+
- Insert picture from web page
|
|
253
|
+
- Display chart/shapes
|
|
254
|
+
- Display form controls /activeX controls
|
|
255
|
+
- Insert/Delete form controls
|
|
256
|
+
- Insert/Delete common shapes for autoshape
|
|
257
|
+
- Support display two colors gradient in fill effects
|
|
258
|
+
- Mobile compatibility
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
## Github-Demos
|
|
262
|
+
|
|
263
|
+
Visit the GridJs demo to find more detail info:
|
|
264
|
+
|
|
265
|
+
https://github.com/aspose-cells/Aspose.Cells-for-.NET/tree/master/Examples_GridJs
|
|
266
|
+
|
|
267
|
+
https://github.com/aspose-cells/Aspose.Cells-for-Java/tree/master/Examples.GridJs
|
|
268
|
+
|
|
269
|
+
https://github.com/aspose-cells/Aspose.Cells-for-Python-via-.NET/tree/main/Examples_GridJs_Python_Net
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
## Documentation
|
|
274
|
+
|
|
275
|
+
Online documentation is available here:
|
|
276
|
+
|
|
277
|
+
- [Developer's Guide C#](https://docs.aspose.com/cells/net/aspose-cells-gridjs/)
|
|
278
|
+
- [API Reference C#](https://docs.aspose.com/cells/net/aspose-cells-gridjs/client/)
|
|
279
|
+
- [Developer's Guide Python](https://docs.aspose.com/cells/python-net/aspose-cells-gridjs/)
|
|
280
|
+
- [API Reference Python](https://docs.aspose.com/cells/python-net/aspose-cells-gridjs/client/)
|
|
281
|
+
- [Developer's Guide JAVA](https://docs.aspose.com/cells/java/aspose-cells-gridjs/)
|
|
282
|
+
- [API Reference JAVA](https://docs.aspose.com/cells/java/aspose-cells-gridjs/client/)
|
|
283
|
+
|
|
284
|
+
## Browser Support
|
|
285
|
+
|
|
286
|
+
Modern browsers(chrome, firefox, Safari).
|
|
287
|
+
|
|
288
|
+
## Version History
|
|
289
|
+
|
|
290
|
+
v24.9.1:
|
|
291
|
+
|
|
292
|
+
- fix bug that fail to insert column in the new added worksheet
|
|
293
|
+
- fix bug that fail to rename worksheet
|
|
294
|
+
- support lazy loading
|
|
295
|
+
|
|
296
|
+
v24.10:
|
|
297
|
+
|
|
298
|
+
- support a view option to show formulas
|
|
299
|
+
|
|
300
|
+
v24.11:
|
|
301
|
+
|
|
302
|
+
- improve the display of rich text cell values
|
|
303
|
+
|
|
304
|
+
v24.12:
|
|
305
|
+
|
|
306
|
+
- support API to show HTML nodes and interact with HTML nodes at specified cell positions
|
|
307
|
+
- support pre-check event for row/column delete/insert operations
|
|
308
|
+
- support row/column insert/delete events for client APIs
|
|
309
|
+
- support events for updating cells
|
|
310
|
+
- support multiple instances on one page
|
|
311
|
+
|
|
312
|
+
v25.1:
|
|
313
|
+
|
|
314
|
+
- support copy/paste from MS-Excel
|
|
315
|
+
|
|
316
|
+
v25.2:
|
|
317
|
+
|
|
318
|
+
- support copy/paste from MS-Excel
|
|
319
|
+
- enhancement for automatic operations for user’s convenience, such as extending blank row/column, page scrolling, …
|
|
320
|
+
|
|
321
|
+
v25.3:
|
|
322
|
+
|
|
323
|
+
- support more shotcut keys
|
|
324
|
+
- support pasting the content copied from excel to multiple target areas
|
|
325
|
+
|
|
326
|
+
v25.4:
|
|
327
|
+
|
|
328
|
+
- support show statistics information in the lower right corner when cells are selected
|
|
329
|
+
|
|
330
|
+
v25.5:
|
|
331
|
+
|
|
332
|
+
- add support for Polish menus.
|
|
333
|
+
- support APIs for insert/delete rows/columns
|
|
334
|
+
|
|
335
|
+
v25.6:
|
|
50
336
|
|
|
51
|
-
|
|
52
|
-
|
|
337
|
+
- support APIs for resize rows/columns
|
|
338
|
+
- support APIs for hide/unhide rows/columns
|
|
53
339
|
|
|
54
|
-
|
|
340
|
+
v25.7:
|
|
55
341
|
|
|
56
|
-
|
|
342
|
+
- Support APIs to enable /disable editable range
|
|
343
|
+
- Support APIs to add/modify/delete worksheet
|
|
344
|
+
- Support APIs to add/modify/delete comment
|
|
345
|
+
- Support APIs to set attribute for range of cells
|
|
346
|
+
- Support APIs to delete for range of cells
|
|
57
347
|
|
|
58
|
-
|
|
348
|
+
## License
|
|
59
349
|
|
|
60
|
-
|
|
350
|
+
MIT
|
|
61
351
|
|
|
62
|
-
|
|
352
|
+
## Support
|
|
63
353
|
|
|
64
|
-
|
|
354
|
+
You can ask any question or request features or report bugs using the [Forum](https://forum.aspose.com/c/cells).
|
|
65
355
|
|
|
66
|
-
|
|
67
|
-
+ **Product Home:** [Aspose.Cells for Java](http://www.aspose.com/products/cells/java)
|
|
68
|
-
+ **Download:** [Download Aspose.Cells for Java](https://downloads.aspose.com/cells/java)
|
|
69
|
-
+ **Documentation:** [Aspose.Cells for Java Documentation](https://docs.aspose.com/display/cellsjava/Home)
|
|
70
|
-
+ **Forum:** [Aspose.Cells for Java Forum](http://www.aspose.com/community/forums/aspose.cells-product-family/19/showforum.aspx)
|
|
71
|
-
+ **Blog:** [Aspose.Cells for Java Blog](https://blog.aspose.com/category/aspose-products/aspose-cells-product-family/)
|
|
356
|
+
[Product Page](https://products.aspose.com/cells) | [Product Documentation](https://docs.aspose.com/cells/net/aspose-cells-gridjs/) | [Blog](https://blog.aspose.com/category/cells/) |[API Reference](https://reference.aspose.com/cells/net/aspose.cells.gridjs/) | [Source Code Samples](https://github.com/aspose-cells/Aspose.Cells-for-.NET/tree/master/Examples_GridJs) | [Free Support](https://forum.aspose.com/c/cells)
|
package/example/pom.xml
CHANGED
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
<dependency>
|
|
52
52
|
<groupId>com.aspose</groupId>
|
|
53
53
|
<artifactId>aspose-cells</artifactId>
|
|
54
|
-
<version>25.
|
|
54
|
+
<version>25.7</version>
|
|
55
55
|
</dependency>
|
|
56
56
|
<dependency>
|
|
57
57
|
<groupId>com.aspose</groupId>
|
|
58
58
|
<artifactId>aspose-cells</artifactId>
|
|
59
|
-
<version>25.
|
|
59
|
+
<version>25.7</version>
|
|
60
60
|
<classifier>gridjs</classifier>
|
|
61
61
|
</dependency>
|
|
62
62
|
<!-- <dependency>
|
|
@@ -2,10 +2,12 @@ package com.aspose.gridjs.demo;
|
|
|
2
2
|
|
|
3
3
|
import org.springframework.beans.factory.annotation.Value;
|
|
4
4
|
import org.springframework.context.annotation.Bean;
|
|
5
|
+
import org.springframework.context.annotation.ComponentScan;
|
|
5
6
|
import org.springframework.context.annotation.Configuration;
|
|
6
7
|
|
|
7
8
|
import com.aspose.gridjs.GridJsOptions;
|
|
8
9
|
import com.aspose.gridjs.GridJsService;
|
|
10
|
+
import com.aspose.gridjs.GridJsWorkbook;
|
|
9
11
|
import com.aspose.gridjs.IGridJsService;
|
|
10
12
|
|
|
11
13
|
@Configuration
|
|
@@ -17,6 +19,13 @@ public class MyConfig {
|
|
|
17
19
|
@Value("${testconfig.AsposeLicensePath}")
|
|
18
20
|
public String asposeLicensePath;
|
|
19
21
|
|
|
22
|
+
|
|
23
|
+
@Bean
|
|
24
|
+
public GridJsWorkbook gridJsWorkbook() {
|
|
25
|
+
return new GridJsWorkbook();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
20
29
|
@Bean
|
|
21
30
|
public GridJsOptions gridJsOptions() {
|
|
22
31
|
GridJsOptions options=new GridJsOptions();
|
|
@@ -170,8 +170,8 @@ public class GridJs2Controller extends GridJsControllerBase{
|
|
|
170
170
|
@GetMapping("/ImageUrl")
|
|
171
171
|
public ResponseEntity<String> getImageUrl(@RequestParam String id, @RequestParam String uid) {
|
|
172
172
|
return super.getImageUrl(id, uid);
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
}
|
|
174
|
+
|
|
175
175
|
@GetMapping("/Ole")
|
|
176
176
|
public ResponseEntity<?> getOle(HttpServletRequest request) {
|
|
177
177
|
return super.getOle(request);
|
|
@@ -180,16 +180,16 @@ public class GridJs2Controller extends GridJsControllerBase{
|
|
|
180
180
|
@GetMapping("/GetFile")
|
|
181
181
|
public ResponseEntity<?> getFile(@RequestParam("id") String id) {
|
|
182
182
|
return super.getFile(id);
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
}
|
|
184
|
+
|
|
185
185
|
@PostMapping("/Download")
|
|
186
186
|
public ResponseEntity<String> download(HttpServletRequest request) {
|
|
187
187
|
return super.download(request);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
}
|
|
@@ -2,12 +2,16 @@ spring.application.name=gridjsdemo
|
|
|
2
2
|
spring.servlet.multipart.enabled=true
|
|
3
3
|
spring.servlet.multipart.max-file-size=10MB
|
|
4
4
|
spring.servlet.multipart.max-request-size=10MB
|
|
5
|
+
#for local test
|
|
5
6
|
#testconfig.ListDir=D:\\codebase\\customerissue\\wb\\tempfromdownload\\
|
|
6
|
-
#
|
|
7
|
+
#testconfig.FileName=excelColumnWordBreak.xlsm
|
|
8
|
+
#testconfig.CachePath=F:\\storage\\gridjs_temp
|
|
9
|
+
#testconfig.UploadPath=F:\\storage\\upload
|
|
10
|
+
#testconfig.AsposeLicensePath=F:\\aspose.lic
|
|
11
|
+
#for docker linux
|
|
7
12
|
testconfig.ListDir=/app/wb
|
|
8
|
-
testconfig.FileName=
|
|
13
|
+
testconfig.FileName=controls.xlsx
|
|
9
14
|
testconfig.CachePath=/app/grid_cache
|
|
10
15
|
testconfig.UploadPath=/app/upload
|
|
11
16
|
testconfig.AsposeLicensePath=/app/license
|
|
12
|
-
|
|
13
17
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 22 22" style="enable-background:new 0 0 22 22;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:url(#SVGID_1_);}
|
|
7
|
+
.st1{fill:url(#SVGID_2_);}
|
|
8
|
+
.st2{fill:url(#SVGID_3_);}
|
|
9
|
+
.st3{fill:url(#SVGID_4_);}
|
|
10
|
+
.st4{opacity:0.6;}
|
|
11
|
+
.st5{opacity:0.38;fill:url(#SVGID_5_);enable-background:new ;}
|
|
12
|
+
.st6{opacity:0.38;fill:url(#SVGID_6_);enable-background:new ;}
|
|
13
|
+
.st7{opacity:0.38;fill:url(#SVGID_7_);enable-background:new ;}
|
|
14
|
+
.st8{opacity:0.38;fill:url(#SVGID_8_);enable-background:new ;}
|
|
15
|
+
</style>
|
|
16
|
+
<g>
|
|
17
|
+
|
|
18
|
+
<radialGradient id="SVGID_1_" cx="519.1851" cy="-127.3083" r="8.2454" gradientTransform="matrix(0 1 -0.9943 0 -113.4659 -506.377)" gradientUnits="userSpaceOnUse">
|
|
19
|
+
<stop offset="0.1429" style="stop-color:#D5EFFC"/>
|
|
20
|
+
<stop offset="0.8424" style="stop-color:#3C8EC6"/>
|
|
21
|
+
<stop offset="1" style="stop-color:#3399CC"/>
|
|
22
|
+
</radialGradient>
|
|
23
|
+
<path class="st0" d="M21,13.6c0-0.5,0.5-6.4-4.6-9.1C14.1,3.2,10.9,3.2,9.1,5C6,8.2,8.6,11.5,9.6,11.8c0,0,0,0,0-0.1
|
|
24
|
+
c-1.6-6.3,9.3-7.4,11.2,1.8C20.9,13.9,21,13.9,21,13.6z"/>
|
|
25
|
+
|
|
26
|
+
<radialGradient id="SVGID_2_" cx="446.2906" cy="702.4343" r="5.9862" gradientTransform="matrix(0.9943 0 0 1 -430.3552 -688)" gradientUnits="userSpaceOnUse">
|
|
27
|
+
<stop offset="0.1429" style="stop-color:#FEE588"/>
|
|
28
|
+
<stop offset="0.5636" style="stop-color:#F79B30"/>
|
|
29
|
+
<stop offset="0.6867" style="stop-color:#F58B2D"/>
|
|
30
|
+
<stop offset="0.8883" style="stop-color:#F3752A"/>
|
|
31
|
+
<stop offset="1" style="stop-color:#F36C29"/>
|
|
32
|
+
</radialGradient>
|
|
33
|
+
<path class="st1" d="M8.5,21.2c0.5,0,6.4,0.5,9.1-4.6c1.3-2.4,1.2-5.6-0.5-7.4c-3.1-3.1-6.4-0.5-6.8,0.5c0,0,0,0,0.1,0
|
|
34
|
+
c6.2-1.6,7.3,9.3-1.8,11.3C8.3,21,8.3,21.1,8.5,21.2z"/>
|
|
35
|
+
|
|
36
|
+
<radialGradient id="SVGID_3_" cx="-378.6884" cy="623.4329" r="8.246" gradientTransform="matrix(0 -1 0.9943 0 -610.95 -369.3066)" gradientUnits="userSpaceOnUse">
|
|
37
|
+
<stop offset="0" style="stop-color:#FCB116"/>
|
|
38
|
+
<stop offset="0.193" style="stop-color:#FBB318"/>
|
|
39
|
+
<stop offset="0.3352" style="stop-color:#F9B91C"/>
|
|
40
|
+
<stop offset="0.461" style="stop-color:#F6C323"/>
|
|
41
|
+
<stop offset="0.5767" style="stop-color:#F4D12D"/>
|
|
42
|
+
<stop offset="0.6727" style="stop-color:#F0E03A"/>
|
|
43
|
+
<stop offset="0.7439" style="stop-color:#E5D534"/>
|
|
44
|
+
<stop offset="0.8645" style="stop-color:#CFBD24"/>
|
|
45
|
+
<stop offset="1" style="stop-color:#B19E11"/>
|
|
46
|
+
</radialGradient>
|
|
47
|
+
<path class="st2" d="M1,8.6c0,0.5-0.5,6.4,4.6,9.1C8,19,11.2,18.9,13,17.2c3.1-3.2,0.5-6.5-0.5-6.8c0,0,0,0,0,0.1
|
|
48
|
+
c1.6,6.3-9.3,7.4-11.2-1.8C1.2,8.3,1.1,8.3,1,8.6z"/>
|
|
49
|
+
|
|
50
|
+
<radialGradient id="SVGID_4_" cx="445.619" cy="696.9989" r="8.2461" gradientTransform="matrix(0.9943 0 0 1 -430.3552 -688)" gradientUnits="userSpaceOnUse">
|
|
51
|
+
<stop offset="0" style="stop-color:#A1C43A"/>
|
|
52
|
+
<stop offset="0.4545" style="stop-color:#A0CC3A"/>
|
|
53
|
+
<stop offset="1" style="stop-color:#3C943A"/>
|
|
54
|
+
</radialGradient>
|
|
55
|
+
<path class="st3" d="M13.5,1C13,1,7.1,0.6,4.5,5.7C3.2,8.1,3.2,11.3,5,13c3.1,3.1,6.4,0.5,6.8-0.5c0,0,0,0-0.1,0
|
|
56
|
+
c-6.2,1.6-7.3-9.3,1.8-11.3C13.8,1.2,13.8,1.1,13.5,1z"/>
|
|
57
|
+
<g class="st4">
|
|
58
|
+
|
|
59
|
+
<radialGradient id="SVGID_5_" cx="413.168" cy="345.1736" r="9.5277" gradientTransform="matrix(1.0925 0 0 1.6216 -440.2973 -540.7683)" gradientUnits="userSpaceOnUse">
|
|
60
|
+
<stop offset="0" style="stop-color:#F9E788"/>
|
|
61
|
+
<stop offset="1" style="stop-color:#FFFFFF"/>
|
|
62
|
+
</radialGradient>
|
|
63
|
+
<path class="st5" d="M11,5.2c-0.9,0-1.7,0.2-2.4,0.5c-2.3,3,0.1,5.9,1,6.2c0,0,0,0,0-0.1C8.7,8,12.4,6,15.8,7.2
|
|
64
|
+
C14.7,6,12.9,5.2,11,5.2z"/>
|
|
65
|
+
|
|
66
|
+
<radialGradient id="SVGID_6_" cx="413.1686" cy="345.1745" r="9.5274" gradientTransform="matrix(1.0925 0 0 1.6216 -440.2973 -540.7683)" gradientUnits="userSpaceOnUse">
|
|
67
|
+
<stop offset="0" style="stop-color:#F9E788"/>
|
|
68
|
+
<stop offset="1" style="stop-color:#FFFFFF"/>
|
|
69
|
+
</radialGradient>
|
|
70
|
+
<path class="st6" d="M10.3,9.7C10.3,9.7,10.3,9.7,10.3,9.7c3.8-0.9,5.7,2.7,4.6,6.1c1.5-1.1,2.4-2.8,2.4-4.7
|
|
71
|
+
c0-0.7-0.1-1.4-0.4-2.1C13.8,6.1,10.6,8.7,10.3,9.7z"/>
|
|
72
|
+
|
|
73
|
+
<radialGradient id="SVGID_7_" cx="413.1689" cy="345.1732" r="9.526" gradientTransform="matrix(1.0925 0 0 1.6216 -440.2973 -540.7683)" gradientUnits="userSpaceOnUse">
|
|
74
|
+
<stop offset="0" style="stop-color:#F9E788"/>
|
|
75
|
+
<stop offset="1" style="stop-color:#FFFFFF"/>
|
|
76
|
+
</radialGradient>
|
|
77
|
+
<path class="st7" d="M12.5,10.4C12.4,10.3,12.4,10.4,12.5,10.4c0.9,3.9-2.7,5.8-6.2,4.6C7.4,16.2,9.1,17,11,17
|
|
78
|
+
c0.9,0,1.7-0.2,2.4-0.5C15.7,13.6,13.4,10.7,12.5,10.4z"/>
|
|
79
|
+
|
|
80
|
+
<radialGradient id="SVGID_8_" cx="413.168" cy="345.1736" r="9.5275" gradientTransform="matrix(1.0925 0 0 1.6216 -440.2973 -540.7683)" gradientUnits="userSpaceOnUse">
|
|
81
|
+
<stop offset="0" style="stop-color:#F9E788"/>
|
|
82
|
+
<stop offset="1" style="stop-color:#FFFFFF"/>
|
|
83
|
+
</radialGradient>
|
|
84
|
+
<path class="st8" d="M11.8,12.5C11.8,12.5,11.8,12.5,11.8,12.5C8,13.5,6.1,9.9,7.2,6.4c-1.5,1.1-2.4,2.8-2.4,4.7
|
|
85
|
+
c0,0.7,0.1,1.4,0.4,2.1C8.3,16.1,11.4,13.5,11.8,12.5z"/>
|
|
86
|
+
</g>
|
|
87
|
+
</g>
|
|
88
|
+
</svg>
|