This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
forked from exceljs/exceljs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO.txt
297 lines (264 loc) · 8.87 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
TODO:
On the way to the impossible we might find something eminently doable
Page Setup
Themes:
Not supported
Margins
Inches?
<pageMargins left="0.25" right="0.25" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
========================================================================================================================
Page Setup
<pageSetup paperSize="9" orientation="portrait" horizontalDpi="4294967295" verticalDpi="4294967295" r:id="rId1"/>
<pageSetup paperSize="119" pageOrder="overThenDown" orientation="portrait" blackAndWhite="1"
draft="1" cellComments="atEnd" errors="dash" horizontalDpi="4294967295" verticalDpi="4294967295" r:id="rId1"/>
<pageSetup paperSize="119" orientation="portrait" blackAndWhite="1" draft="1" cellComments="asDisplayed"
errors="blank" horizontalDpi="4294967295" verticalDpi="4294967295" r:id="rId1"/>
<pageSetup paperSize="119" orientation="portrait" errors="NA" horizontalDpi="4294967295" verticalDpi="4294967295" r:id="rId1"/>
<pageSetup paperSize="119" scale="95" fitToWidth="2" fitToHeight="3" orientation="landscape" r:id="rId1"/>
orientation: portrait, landscape
pageOrder: overThenDown, downThenOver(*)
blackAndWhite: true, false(*)
draft: true, false(*)
cellComments: atEnd, asDisplayed, (None)(*)
errors: dash, blank, NA, displayed(*)
scale: #
fitToWidth: num pages wide
fitToHeight: num pages high
horizontalDpi: 4294967295 (-1?)
verticalDpi: 4294967295
How to determine between scale and fit to page(s)
<sheetPr>
<pageSetUpPr fitToPage="1"/>
</sheetPr>
paperSize:
| Letter (*) | - |
| Legal | 5 |
| Executive | 7 |
| A4 | 9 |
| A5 | 11 |
| B5 (JIS) | 13 |
| Envelope #10 | 20 |
| Envelope DL | 27 |
| Envelope C5 | 28 |
| Envelope B5 | 34 |
| Envelope Monarch | 37 |
| Double Japan Postcard Rotated | 82 |
| 16K 197x273 mm | 119 |
========================================================================================================================
Print Options:
<printOptions headings="1" gridLines="1"/>
<printOptions horizontalCentered="1" verticalCentered="1"/>
headings: true, false(*)
gridLines: true, false(*)
horizontalCentered: true, false(*)
verticalCentered: true, false(*)
========================================================================================================================
Print Area
In workbook.xml
<definedNames>
<definedName name="_xlnm.Print_Area" localSheetId="0">Sheet1!$A$1:$C$11</definedName>
</definedNames>
In app.xml ?
<TitlesOfParts>
<vt:vector size="2" baseType="lpstr">
<vt:lpstr>Sheet1</vt:lpstr>
<vt:lpstr>Sheet1!Print_Area</vt:lpstr>
</vt:vector>
</TitlesOfParts>
Manual Page Breaks
In sheet.xml
<rowBreaks count="2" manualBreakCount="2">
<brk id="5" max="16383" man="1"/> // id="5" means underneath row 5 max & man??? is that a spelling error?
<brk id="7" max="16383" man="1"/>
</rowBreaks>
<colBreaks count="3" manualBreakCount="3">
<brk id="3" max="1048575" man="1"/>
<brk id="6" max="1048575" man="1"/>
<brk id="9" max="1048575" man="1"/>
</colBreaks>
Background Image
In sheet.xml
<picture r:id="rId2"/>
In sheet.xml.rels
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image2.png"/>
Print Titles (rows and columns repeated on each page)
In workbook.xml
<definedName name="_xlnm.Print_Titles" localSheetId="0">Sheet1!$A:$B,Sheet1!$1:$2</definedName>
========================================================================================================================
Headers and Footers
<headerFooter>
<oddHeader>Page &P</oddHeader>
<oddFooter>Page &P</oddFooter>
</headerFooter>
<headerFooter>
<oddHeader>Page &P of &N</oddHeader>
<oddFooter>&A</oddFooter>
</headerFooter>
<headerFooter differentOddEven="1" differentFirst="1">
<oddHeader>&L&B Confidential&B&C&D&RPage &P</oddHeader>
<oddFooter>&F</oddFooter>
</headerFooter>
<headerFooter>
<oddHeader>&Z&F</oddHeader>
<oddFooter>Prepared by Guyon Roche &D&RPage &P</oddFooter>
</headerFooter>
<headerFooter differentOddEven="1" differentFirst="1">
<oddHeader>&L&"Algerian,Italic"&14&S&U&X&K05+000Formatted&C&Z&F</oddHeader>
<oddFooter>Prepared by Guyon Roche &D&RPage &P</oddFooter>
<evenHeader>&C&T</evenHeader>
<firstHeader>&L&P of &N&C&D &T
&Z&F
&F
&A</firstHeader>
</headerFooter>
<headerFooter differentOddEven="1" differentFirst="1">
<oddHeader>&L&"Algerian,Italic"&14&S&U&X&K05+000Formatted&C&K008000Colour Wheel</oddHeader>
<oddFooter>Prepared by Guyon Roche &D&RPage &P</oddFooter>
<evenHeader>&C&T</evenHeader>
<firstHeader>&L&KAFD680RGB&C&KFF0000Std Colour&R&K09+059Purple Accent 6 60%</firstHeader>
</headerFooter>
oddHeader is default for where there are no differences
evenHeader & firstHeader used with appropriate options
Codes
&P - &[Page] - Page#
&N - &[Pages] - Page Count
&A - &[Tab] - Sheet #
&D - &[Date] - Date
&F - &[File] - Filename
&Z - &[Path] - Path
&L - Align Left
&C - Align Centre
&R - Align Right
&B - Bold Toggle
&"Font Name"
&14 - font size
&S - strikethrough
&U - underline
&X - superscript
&K05+000 colour?
&KFF0000 RGB, no alpha
&[Page]&[Pages]&[Date]&[Time]&[Path]&[File]&[File]&[Tab]
&[Picture]
========================================================================================================================
sheet.pageSetup = {
// in sheet
margins: {
left: 0.25, right: 0.25, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3
},
orientation: ['portrait(*)', 'landscape'],
pageOrder: ['overThenDown', 'downThenOver(*)'],
blackAndWhite: [true, false(*)],
draft: [true, false(*)],
cellComments: ['atEnd', 'asDisplayed', 'None(*)'',
errors: ['dash', 'blank', 'NA', 'displayed(*)''],
scale: 90(*),
fitToWidth: 2,
fitToHeight: 3,
paperSize: 9,
showRowColHeaders: [true, false(*)],
showGridLines: [true, false(*)],
horizontalCentered: [true, false(*)],
verticalCentered: [true, false(*)],
rowBreaks: [5,7],
colBreaks: [3,6,9],
// phase 2
header: {
odd: {
left: '',
center: '&[Page] of &[Pages]',
right: '',
raw: '&C&P of &N' // raw supercedes the others
},
even: {}, first: {}
},
footer: {}, // as per header
// defined names - phase 3
printArea: 'A1:D11',
printTitles: {
rows: '1:2' || '$1:$2' || 1 || '$1',
columns: 'B:C' || '$B:$C' | 'A' || '$A'
}
}
========================================================================================================================
https://github.com/guyonroche/exceljs/pull/114
<si>
<t>(a japanese text in KANJI)</t>
<rPh sb="0" eb="1">
<t>(its pronounciation in KATAKANA)</t>
</rPh>
</si>
<si>
<t>役割</t> <!-- role in English -->
<rPh sb="0" eb="2">
<t>ヤクワリ</t> <!-- Japanese phonic symbol called Katakana of role -->
</rPh>
<phoneticPr fontId="1" />
</si>
parseSharedStrings: function (stream) {
return new Bluebird(function(resolve, reject) {
var parser = Sax.createStream(true, {});
var t = null;
var sharedStrings = [];
var rph = false;
parser.on('opentag', function (node) {
if (!rph && node.name === 't') {
t = '';
}
if (node.name === 'rPh') {
rph = true;
}
});
parser.on('closetag', function (name) {
if ((t !== null) && (name === 't')) {
sharedStrings.push(t);
t = null;
}
if (name === 'rPh') {
rph = false;
}
});
parser.on('text', function (text) {
if (t !== null) {
t += text;
}
});
parser.on('end', function () {
resolve(sharedStrings);
});
parser.on('error', function (error) {
reject(error);
});
stream.pipe(parser);
});
},
========================================================================================================================
Comments
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<authors>
<author>Author</author>
</authors>
<commentList>
<comment ref="A1" authorId="0" shapeId="0">
<text>
<r>
<rPr>
<b/>
<sz val="9"/>
<color indexed="81"/>
<rFont val="Tahoma"/>
<charset val="1"/>
</rPr><t>Author:</t>
</r><r>
<rPr>
<sz val="9"/>
<color indexed="81"/>
<rFont val="Tahoma"/>
<charset val="1"/>
</rPr><t xml:space="preserve">
Is it me you're looking for</t>
</r>
</text>
</comment>
</commentList>
</comments>