xlsx-template icon indicating copy to clipboard operation
xlsx-template copied to clipboard

Dynamic Nested Header Support

Open SemihGk opened this issue 8 years ago • 1 comments

Hello,

First of all, this is super helpful library. Thank you for your support. Anyway, I am wondering that how can I do dynamic headers(nested dynamic headers)?

For instance,

var values = {
    items: [{
    name: 'Drink',
    count: 3,
    brand: 'Pepsi'
  }, {
    name: 'Food',
    count: 2,
    brand: 'KFC'
  }, {
    name: 'Desert',
    count: 5,
    brand: 'CheeseCakeFactory'
 }]
}

and I want to print this array in this format:

Drink count 3 brand Pepsi

Food count 2 brand KFC

Desert count 5, brand CheesecakeFactory

I thought this way, but it did not work out:

${table:items.name}
${table:items.count}
${table:items.brand}

but it prints

Drink Food Desert 3 2 5 Pepsi KFC CheesecakeFactory

if this lib supports this feature, please let me know how can I do that? Thanks a lot for any kind of help!

SemihGk avatar Jan 10 '17 05:01 SemihGk

+1

tnhu avatar Feb 17 '17 00:02 tnhu