xlsx.js icon indicating copy to clipboard operation
xlsx.js copied to clipboard

Export example code for 2.2.0?

Open jacobsjensen opened this issue 12 years ago • 8 comments

Hi guys,

First of all, great job!

I'm currently using the old version (1.0) which creates semi-corrupt excel output from my html table (It opens correctly after Excel repairs the file). I can't seem to find the error in my table markup, but if I replace the markup inside my table to match your jsfiddle example markup, it exports correctly. I was hoping that using the new 2.2.0 would solve it, but I can't find out a way to tweak the existing export code to match 2.2.0 requirements.

Can you please supply a modified export example matching the 2.2.0 requirements?

Thanks in advance! :-)

jacobsjensen avatar Jan 08 '13 08:01 jacobsjensen

HI, yes great job!, I am on the same situation, I need the example fiddle http://jsfiddle.net/innovatejs/ueETX/ but run with the new library, please stephen can you communicate with me?

DLDante avatar Nov 12 '13 15:11 DLDante

I was having trouble getting an example to work too but this is now working nicely: http://jsfiddle.net/graemegeorge/V53HR/

joe4mg avatar Nov 19 '13 10:11 joe4mg

The example here http://jsfiddle.net/graemegeorge/V53HR/ does not really solve our issue as with jacobsjensen is trying to point out.

How do you pass the data from a HTML Table to xlsx?

junjimalaza avatar Jan 03 '14 08:01 junjimalaza

Here you are http://jsfiddle.net/joe4mg/hvjEM/1/ - the data you need to pass to this version of xlsx.js is just in a slightly different format

joe4mg avatar Jan 03 '14 13:01 joe4mg

Thanks joe4mg is it also possible to maintain the table format like the bold and the background colors plus the table borders. Just like the old xls versions, maybe this would be a good example http://fiddle.jshell.net/cmewv/537/

junjimalaza avatar Jan 06 '14 01:01 junjimalaza

I have a fork that supports font and background color (among other things), and borders are already supported, so you should be able to accomplish this. https://github.com/tbenbrahim/xlsx.js

tbenbrahim avatar Jan 14 '14 20:01 tbenbrahim

I'll have a look thanks

junjimalaza avatar Jan 15 '14 01:01 junjimalaza

How do you point to a specific cell, the data that I have is loaded from the static HTML Table

junjimalaza avatar Jan 15 '14 12:01 junjimalaza