How to export multiple Data of a cell in a good format in EXCEL?

How to export multiple Data of a cell in a good format in EXCEL?

Aakash BistAakash Bist Posts: 1Questions: 1Answers: 0
edited April 7 in Free community support

Populating Multiple Data in single cell but unable to export to excel in good format. How to make them appear in different cells or add new line after every data set.

Using it in ANGULAR 6 project.
Help is much appreciated!
Thank you.

This is my UI:

This is how it looks in EXCEL

This is my code:

 data: 'givenProducts',
              render: function (data, row) {
                if (data === '' || data == 'null' || data == undefined) {
                  return '---'
                } else {
                  let product = ``;
                  data.forEach(item => {
                    product += `
                    <tr style="background-color: transparent;" > 
                    <td style="width: 30%;">${item.productName || '---'}</td>
                    <td style="width: 20%;">${item.pob || '---'}</td>
                    <td style="width: 15%;">${item.availableStock || '---'}</td>
                    <td style="width: 15%;">${item.productQuantity || '---'}</td>
                    </tr>
                   `
                  })
                  let table = `<table style="width: 100%;" > ${product}   </table>`
                  return (table)
                }
                
              }

Answers

  • colincolin Posts: 8,661Questions: 0Answers: 1,449

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.