Add Static Worksheet to Excel html5 Export

Add Static Worksheet to Excel html5 Export

jlockjlock Posts: 14Questions: 4Answers: 0

I am making many customizations to my excel export and need to have the workbook contain a second worksheet. I want to include 4 rows of data and was thinking it might be done through the customize option. Does anyone know how to do this? I am not good at jquery!

data I want to add to a new worksheet called Report Info

var r1 = Addrow(1, [{ key: 'A', value: 'Report Name:' }, { key: 'B', value: 'List' }]);
var r2 = Addrow(2, [{ key: 'A', value: 'Related to:' }, { key: 'B', value: 'Selection' }]);                          
var r3 = Addrow(3, [{ key: 'A', value: 'User:' }, { key: 'B', value: 'User' }]);
var r4 = Addrow(4, [{ key: 'A', value: 'Date:' }, { key: 'B', value: 'Date' }]);            
var r5 = Addrow(5, [{ key: 'A', value: '' }, { key: 'B', value: '' }]);        

This question has an accepted answers - jump to answer

Answers

  • jlockjlock Posts: 14Questions: 4Answers: 0

    @F12Magic you have posted a lot of helpful code, can you write something to add a second worksheet?

  • F12MagicF12Magic Posts: 109Questions: 0Answers: 28

    @jlock I'll try to make an example and post it on codepen. Could take a couple of days since I don't have much time lately. Watch out for another reply in this thread.

  • jlockjlock Posts: 14Questions: 4Answers: 0

    Thank you @F12Magic

    I should add that the second worksheet is not going to pull from the datatable. I would be setting the text of the cell through jquery.

  • F12MagicF12Magic Posts: 109Questions: 0Answers: 28
    Answer ✓

    Okay @jlock . This was new for me too. :smile:
    After some attempts, I've got an excel file with a second static worksheet, without errors when opening. The complete example is on Codepen.
    Hope you can do something with it.

  • jlockjlock Posts: 14Questions: 4Answers: 0

    This is perfect, thank you so much! I owe you! I hope others find this useful as well.

This discussion has been closed.