Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formula support in Xlsx style #76

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions xlsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down