Skip to content

Commit c84ef5c

Browse files
authored
Merge pull request #1 from protobi/master
merge with base
2 parents 3c7f807 + c86472d commit c84ef5c

17 files changed

+1275
-933
lines changed

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ The following properties are currently used when generating an XLSX file, but no
437437
- `ws['!rowBreaks']`: array of row break points, e.g. `[16,32]`
438438
- `ws['!colBreaks']`: array of col break points, e.g. `[8,16]`
439439
- `ws['!pageSetup']`: `{scale: '100', orientation: 'portrait'||'landscape'}
440+
- `ws['!printHeader']`: array of first and last row indexes for repeat header on printing, e.g. `[1,1]` to repeat just first row
441+
- `ws['!freeze']`: string cell reference for breakpoint, e.g. the following will freeze the first row and first column:
442+
{
443+
xSplit: "1",
444+
ySplit: "1",
445+
topLeftCell: "B2",
446+
activePane: "bottomRight",
447+
state: "frozen"
448+
}
440449

441450

442451
### Workbook Object
@@ -533,43 +542,42 @@ top-level attributes: `fill`, `font`, `numFmt`, `alignment`, and `border`.
533542

534543

535544
| Style Attribute | Sub Attributes | Values |
536-
| :-------------- | :------------- | :------------- | :----- |
537-
| fill | patternType | `"solid"` or `"none"` |
545+
| :-------------- | :------------- | :------------- |
546+
| fill | patternType | `"solid"` or `"none"`
538547
| | fgColor | `COLOR_SPEC`
539548
| | bgColor | `COLOR_SPEC`
540549
| font | name | `"Calibri"` // default
541550
| | sz | `"11"` // font size in points
542551
| | color | `COLOR_SPEC`
543-
| | bold | `true || false`
544-
| | underline | `true || false`
545-
| | italic | `true || false`
546-
| | strike | `true || false`
547-
| | outline | `true || false`
548-
| | shadow | `true || false`
549-
| | vertAlign | `true || false`
552+
| | bold | `true` or `false`
553+
| | underline | `true` or `false`
554+
| | italic | `true` or `false`
555+
| | strike | `true` or `false`
556+
| | outline | `true` or `false`
557+
| | shadow | `true` or `false`
558+
| | vertAlign | `true` or `false`
550559
| numFmt | | `"0"` // integer index to built in formats, see StyleBuilder.SSF property
551560
| | | `"0.00%"` // string matching a built-in format, see StyleBuilder.SSF
552561
| | | `"0.0%"` // string specifying a custom format
553562
| | | `"0.00%;\\(0.00%\\);\\-;@"` // string specifying a custom format, escaping special characters
554563
| | | `"m/dd/yy"` // string a date format using Excel's format notation
555-
| alignment | vertical | `"bottom"||"center"||"top"`
556-
| | horizontal | `"bottom"||"center"||"top"`
557-
| | wrapText | `true || false`
564+
| alignment | vertical | `"bottom"` or `"center"` or `"top"`
565+
| | horizontal | `"bottom"` or `"center"` or `"top"`
566+
| | wrapText | `true ` or ` false`
558567
| | readingOrder | `2` // for right-to-left
559568
| | textRotation | Number from `0` to `180` or `255` (default is `0`)
560569
| | | `90` is rotated up 90 degrees
561570
| | | `45` is rotated up 45 degrees
562-
| | | `135` is rotated down 45 degrees
571+
| | | `135` is rotated down 45 degrees
563572
| | | `180` is rotated down 180 degrees
564573
| | | `255` is special, aligned vertically
565574
| border | top | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
566575
| | bottom | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
567576
| | left | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
568577
| | right | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
569578
| | diagonal | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
570-
| | diagonalUp | `true||false`
571-
| | diagonalDown | `true||false`
572-
579+
| | diagonalUp | `true` or `false`
580+
| | diagonalDown | `true` or `false`
573581

574582
**COLOR_SPEC**: Colors for `fill`, `font`, and `border` are specified as objects, either:
575583
* `{ auto: 1}` specifying automatic values

bits/01_version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
XLSX.version = '0.8.13';
1+
XLSX.version = '0.8.20';

bits/21_ziputils.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ function getdata(data) {
1515

1616
function safegetzipfile(zip, file) {
1717
var f = file; if(zip.files[f]) return zip.files[f];
18-
f = file.toLowerCase(); if(zip.files[f]) return zip.files[f];
19-
f = f.replace(/\//g,'\\'); if(zip.files[f]) return zip.files[f];
18+
19+
var lowerCaseFiles = {};
20+
for (var key in zip.files) {
21+
lowerCaseFiles[key.toLowerCase()] = zip.files[key];
22+
}
23+
24+
f = file.toLowerCase(); if(lowerCaseFiles[f]) return lowerCaseFiles[f];
25+
f = f.replace(/\//g,'\\'); if(lowerCaseFiles[f]) return lowerCaseFiles[f];
2026
return null;
2127
}
2228

0 commit comments

Comments
 (0)