Read + write style information to .xlsx #263

Open
protobi wants to merge 104 commits from protobi/master into master
11 changed files with 20 additions and 17 deletions
Showing only changes of commit 57b6fd4662 - Show all commits

View File

@ -1 +1 @@
XLSX.version = '0.8.0';
XLSX.version = '0.8.6';

View File

@ -2,7 +2,7 @@
"name": "js-xlsx-style",
"homepage": "https://github.com/protobi/js-xlsx",
"main": "dist/xlsx.js",
"version": "0.8.5",
"version": "0.8.6",
"ignore": [
"bin",
"bits",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11
dist/xlsx.js vendored
View File

@ -4,7 +4,7 @@
/*jshint funcscope:true, eqnull:true */
var XLSX = {};
(function make_xlsx(XLSX){
XLSX.version = '0.8.0';
XLSX.version = '0.8.6';
var current_codepage = 1200, current_cptable;
if(typeof module !== "undefined" && typeof require !== 'undefined') {
if(typeof cptable === 'undefined') cptable = require('./dist/cpexcel');
@ -7651,7 +7651,7 @@ function write_ws_xml_cols(ws, cols) {
}
function write_ws_xml_cell(cell, ref, ws, opts, idx, wb) {
if(cell.v === undefined) return "";
if(cell.v === undefined && cell.s === undefined) return "";
var vv = "";
var oldt = cell.t, oldv = cell.v;
switch(cell.t) {
@ -7738,7 +7738,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess) {
if(opts.cellFormula && (cref=d.match(match_f))!== null) p.f=unescapexml(cref[1]);
/* SCHEMA IS ACTUALLY INCORRECT HERE. IF A CELL HAS NO T, EMIT "" */
if(tag.t === undefined && p.v === undefined) {
if(tag.t === undefined && tag.s === undefined && p.v === undefined) {
if(!opts.sheetStubs) continue;
p.t = "stub";
}
@ -7747,7 +7747,10 @@ return function parse_ws_xml_data(sdata, s, opts, guess) {
if(guess.e.c < idx) guess.e.c = idx;
/* 18.18.11 t ST_CellType */
switch(p.t) {
case 'n': p.v = parseFloat(p.v); break;
case 'n':
p.v = parseFloat(p.v);
if(isNaN(p.v)) p.v = "" // we don't want NaN if p.v is null
break;
case 's':
sstr = strs[parseInt(p.v, 10)];
p.v = sstr.t;

4
dist/xlsx.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/xlsx.min.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "xlsx-style",
"version": "0.8.5",
"version": "0.8.6",
"author": "sheetjs",
"description": "Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet parser and writer (extended to enable read/write of cell formats with xlsx files)",
"keywords": [ "excel", "xls", "xlsx", "xlsb", "xlsm", "ods", "office", "spreadsheet" ],

View File

@ -4,7 +4,7 @@
/*jshint funcscope:true, eqnull:true */
var XLSX = {};
(function make_xlsx(XLSX){
XLSX.version = '0.8.0';
XLSX.version = '0.8.6';
var current_codepage = 1200, current_cptable;
if(typeof module !== "undefined" && typeof require !== 'undefined') {
if(typeof cptable === 'undefined') cptable = require('./dist/cpexcel');