From 952c3505471373f9ce0973c0de86a84678468f1d Mon Sep 17 00:00:00 2001 From: SheetJS Date: Tue, 4 Feb 2014 11:06:59 -0500 Subject: [PATCH] xlsb browser fix --- xlsx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlsx.js b/xlsx.js index 20c54a8..f9f20c8 100644 --- a/xlsx.js +++ b/xlsx.js @@ -433,7 +433,7 @@ function _getchar(x) { return String.fromCharCode(x); } function getdata(data) { if(!data) return null; - if(data.data) return data.data; + if(data.data) return data.name.substr(-4) !== ".bin" ? data.data : data.data.split("").map(function(x) { return x.charCodeAt(0); }); if(data.asNodeBuffer && typeof Buffer !== 'undefined' && data.name.substr(-4)===".bin") return data.asNodeBuffer(); if(data.asBinary && data.name.substr(-4) !== ".bin") return data.asBinary(); if(data._data && data._data.getContent) {