diff --git a/package.json b/package.json index 1c041277c..8bd956790 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "xlsx", - "version": "0.8.20", + "name": "itt-xlsx", + "version": "0.1.0", "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)", + "description": "A fork of xlsx-style with formula. 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" ], "bin": { "xlsx": "./bin/xlsx.njs" @@ -23,7 +23,7 @@ "xlsjs":"", "uglify-js":"" }, - "repository": { "type":"git", "url":"git://github.com/protobi/js-xlsx.git#beta" }, + "repository": { "type":"git", "url":"https://github.com/InTimeTecGitHub/js-xlsx.git" }, "scripts": { "pretest": "git submodule init && git submodule update", "test": "make test" diff --git a/xlsx.js b/xlsx.js index 6bca3c673..e760c9d78 100644 --- a/xlsx.js +++ b/xlsx.js @@ -7682,7 +7682,7 @@ function write_ws_xml_cols(ws, cols) { } function write_ws_xml_cell(cell, ref, ws, opts, idx, wb) { - if (cell.v === undefined && cell.s === undefined) return ""; + if ( ! (cell.v || cell.s || cell.f ) ) return ""; var vv = ""; var oldt = cell.t, oldv = cell.v; switch (cell.t) { @@ -7707,7 +7707,8 @@ function write_ws_xml_cell(cell, ref, ws, opts, idx, wb) { vv = cell.v; break; } - var v = writetag('v', escapexml(vv)), o = {r: ref}; + var o = { r: ref }; + var v = cell.f ? writetag('f', escapexml(cell.f)) : writetag('v', escapexml(vv)); /* TODO: cell style */ var os = get_cell_style(opts.cellXfs, cell, opts); if (os !== 0) o.s = os;