json2xls icon indicating copy to clipboard operation
json2xls copied to clipboard

Can't open file

Open teckays opened this issue 9 years ago • 2 comments

I'm trying to open file with m default application and the following error occurs: It may be damaged or use a file format that Preview doesn’t recognize. I can't open in google drive it as well.

The input json is an array of objects:

[
 {...}.
 {...}
]

teckays avatar Jan 23 '16 22:01 teckays

json2xls uses https://github.com/functionscope/Node-Excel-Export and adds very little excel options of its own, so I think the problem would be there.

Can you try recreating it in steps to see where it fails (this is basically what json2xls does under the hood):

First create the Node-Excel-Export config:

var conf = json2xls.prepareJson(json)

Then put that in Node-Excel-Export

var nodeExcel = require('excel-export');
var result = nodeExcel.execute(conf);

Could you post the conf that has been generated in this way?

rikkertkoppes avatar Jul 01 '16 07:07 rikkertkoppes

@rikkertkoppes Hi, I'm having a similar issue to the original poster in this thread and thought it would be more prudent to expand upon this rather than starting a new issue. I've outputted the config as a JSON text file - it's a pretty large JSON file so the config is also pretty large too. If you can get back to me regarding this I would be extremely grateful. (I can also provide anything else you need if you require anything.)

conf.log

Jam155 avatar Nov 15 '17 09:11 Jam155