Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
version bump 0.4.1: HARB 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
SheetJSDev committed Oct 2, 2014
1 parent d95408b commit 6243ff9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET=j.js
FMT=xls xml xlsx xlsm xlsb misc
FMT=xls xml xlsx xlsm xlsb csv slk dif txt misc
.PHONY: init
init:
bash init.sh
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Supported Formats:
| DIF (plaintext) | JS-HARB |
| UTF-16 Text | JS-HARB |
| CSV / TSV | JS-HARB |
| SYLK (Symbolic Link) | JS-HARB |
| SocialCalc | JS-HARB |

Output formats:
Expand Down
8 changes: 4 additions & 4 deletions j.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ function to_dsv(w, FS, RS) {

function get_cols(sheet, XL) {
var val, r, hdr, R, C, _XL = XL || XLS;
if(!XL.utils.format_cell) XL = XLSX;
if(!_XL.utils.format_cell) _XL = XLSX;
hdr = [];
if(!sheet["!ref"]) return hdr;
r = _XL.utils.decode_range(sheet["!ref"]);
for (R = r.s.r, C = r.s.c; C <= r.e.c; ++C) {
val = sheet[_XL.utils.encode_cell({c:C, r:R})];
if(val == null) continue;
hdr[C] = val.w !== undefined ? val.w : _XL.utils.format_cell ? XL.utils.format_cell(val) : val.v;
hdr[C] = val.w !== undefined ? val.w : _XL.utils.format_cell ? _XL.utils.format_cell(val) : val.v;
}
return hdr;
}
Expand Down Expand Up @@ -298,8 +298,8 @@ var sheet_to_socialcalc = (function() {
};
})();

function to_socialcalc(w, FS, RS) {
var XL = w[0], workbook = w[1];
function to_socialcalc(w) {
var workbook = w[1];
var result = {};
workbook.SheetNames.forEach(function(sheetName) {
var socialcalc = sheet_to_socialcalc(workbook.Sheets[sheetName]);
Expand Down
1 change: 1 addition & 0 deletions multiformat.lst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ smart_tags_2007 .xls .xlsb .xlsx .xml
sushi .xls .xlsb .xlsx .xml
text_and_numbers .xls .xlsb .xlsx .xml
#time_stress_test_1 .xls .xlsb .xlsx .xml
write .dif .txt
xlsx-stream-d-date-cell .xls .xlsb .xlsx .xls.xml .xlsb.xml .xlsx.xml
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "j",
"version": "0.4.0",
"version": "0.4.1",
"author": "sheetjs",
"description": "CLI tool for working with XLS/XLSX/XLSM/XLSB files",
"keywords": [ "excel", "xls", "xlsx", "xlsm", "xlsb", "office", "spreadsheet" ],
Expand All @@ -17,7 +17,7 @@
"dependencies": {
"xlsjs": "~0.7.1",
"xlsx": "~0.7.10",
"harb": "~0.0.2",
"harb": "~0.0.3",
"concat-stream":"",
"commander":""
},
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('source',function(){it('should load',function(){J=require('./');});});

var opts = {cellNF:true};
if(process.env.WTF) opts.WTF = true;
var ex = [".xls",".xml",".xlsx",".xlsm",".xlsb"];
var ex = [".xls",".xml",".xlsx",".xlsm",".xlsb",".csv",".slk",".dif",".txt"];
if(process.env.FMTS) ex=process.env.FMTS.split(":").map(function(x){return x[0]==="."?x:"."+x;});
var exp = ex.map(function(x){ return x + ".pending"; });
function test_file(x) { return ex.indexOf(x.substr(-4))>=0 || ex.indexOf(x.substr(-5))>=0 || exp.indexOf(x.substr(-12))>=0 || exp.indexOf(x.substr(-13))>=0; }
Expand Down
8 changes: 8 additions & 0 deletions tests.lst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2011/pivot_table_test.xls.0.csv
2011/text_and_numbers.xls.0.csv
biff5/number_format_greek.xls.0.csv
sushi.dif
write.dif
write.slk
text_and_numbers.txt
write.txt
A4X_2013.xls
A4X_gnumeric.xls
AutoFilter.xls
Expand Down

0 comments on commit 6243ff9

Please sign in to comment.