<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Export Excel with multiple Headers Using Spreadsheet in SAPUI5 in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228424#M4577475</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I can export the above file format (merged cells in exported excel file) using third-party library 'XLSX.js'.&lt;/P&gt;&lt;P&gt;1. Download the library file from the link : &lt;A href="https://github.com/SheetJS/sheetjs"&gt;https://github.com/SheetJS/sheetjs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. Add this library file to your project.&lt;/P&gt;&lt;P&gt;3. Declare the library in your controller.&lt;/P&gt;&lt;P&gt;4. Configure the following code in your controller.&lt;/P&gt;&lt;P&gt;var data = [ *set your data here* ] &lt;/P&gt;&lt;P&gt;/* generate worksheet */ &lt;/P&gt;&lt;P&gt;var ws = XLSX.utils.aoa_to_sheet(data); &lt;/P&gt;&lt;P&gt;/* merged cells settings */ &lt;/P&gt;&lt;P&gt;var mergedCells = { s: {r: 0, c: 1}, e: {r: 0, c: 2}}; &lt;/P&gt;&lt;P&gt;if (!ws["!merges"]) ws["!merges"] = []; &lt;/P&gt;&lt;P&gt;ws["!merges"].push(mergedCells); &lt;/P&gt;&lt;P&gt;/* generate workbook */ &lt;/P&gt;&lt;P&gt;var wb = XLSX.utils.book_new(); &lt;/P&gt;&lt;P&gt;XLSX.utils.book_append_sheet(wb, ws, "sheet1"); &lt;/P&gt;&lt;P&gt;XLSX.writeFile(wb, "test.xlsx");&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Thiri&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 00:54:59 GMT</pubDate>
    <dc:creator>former_member494689</dc:creator>
    <dc:date>2020-07-06T00:54:59Z</dc:date>
    <item>
      <title>Export Excel with multiple Headers Using Spreadsheet in SAPUI5</title>
      <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaq-p/12228420</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;Is it possible to configure the columns to show the following result using spreadsheet in SAPUI5?&lt;/P&gt;
  &lt;P&gt;If yes, kindly let us know the sample/reference. Thanks.&lt;/P&gt;
  &lt;P&gt;To export excel, I refered this link. But, it is just one line header and no merge cells.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.export.Spreadsheet/sample/sap.ui.export.sample.json/code/Spreadsheet.controller.js"&gt;https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.export.Spreadsheet/sample/sap.ui.export.sample.json/code/Spreadsheet.controller.js&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1820912-mvkgi.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Best Regards,&lt;/P&gt;
  &lt;P&gt;Thiri&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 02:44:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaq-p/12228420</guid>
      <dc:creator>former_member494689</dc:creator>
      <dc:date>2020-07-01T02:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Export Excel with multiple Headers Using Spreadsheet in SAPUI5</title>
      <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228421#M4577472</link>
      <description>&lt;P&gt;Hi Thiri, &lt;/P&gt;&lt;P&gt;Yyou can use class &lt;A href="https://sapui5.hana.ondemand.com/#/api/sap.ui.export.Spreadsheet%23constructor"&gt;sap.ui.export.Spreadsheet&lt;/A&gt; to set up a lot of things in a custom export to excell button of yours, but if I understood correctly, as explained in &lt;A href="https://sapui5.hana.ondemand.com/#/topic/2c641481649f44de9c1c22c9c3c49d13"&gt;this&lt;/A&gt;, grouping headers is not possible.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Felipe  &lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 11:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228421#M4577472</guid>
      <dc:creator>felipe_dimmu23</dc:creator>
      <dc:date>2020-07-01T11:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export Excel with multiple Headers Using Spreadsheet in SAPUI5</title>
      <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228422#M4577473</link>
      <description>&lt;P&gt;Hi Felipe, &lt;/P&gt;&lt;P&gt;Thanks for your feedback. &lt;/P&gt;&lt;P&gt;Yes, I am using sap.ui.export.Spreadsheet. &lt;/P&gt;&lt;P&gt;I also found no sample documents or blogs for merge header cell pattern yet.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Best Regards, &lt;/P&gt;&lt;P&gt;Thiri&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 00:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228422#M4577473</guid>
      <dc:creator>former_member494689</dc:creator>
      <dc:date>2020-07-02T00:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Export Excel with multiple Headers Using Spreadsheet in SAPUI5</title>
      <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228423#M4577474</link>
      <description>&lt;P&gt;Hi Felipe,&lt;/P&gt;&lt;P&gt;If you know any other ways, please let us know.&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Thiri&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 06:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228423#M4577474</guid>
      <dc:creator>former_member494689</dc:creator>
      <dc:date>2020-07-02T06:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Export Excel with multiple Headers Using Spreadsheet in SAPUI5</title>
      <link>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228424#M4577475</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I can export the above file format (merged cells in exported excel file) using third-party library 'XLSX.js'.&lt;/P&gt;&lt;P&gt;1. Download the library file from the link : &lt;A href="https://github.com/SheetJS/sheetjs"&gt;https://github.com/SheetJS/sheetjs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. Add this library file to your project.&lt;/P&gt;&lt;P&gt;3. Declare the library in your controller.&lt;/P&gt;&lt;P&gt;4. Configure the following code in your controller.&lt;/P&gt;&lt;P&gt;var data = [ *set your data here* ] &lt;/P&gt;&lt;P&gt;/* generate worksheet */ &lt;/P&gt;&lt;P&gt;var ws = XLSX.utils.aoa_to_sheet(data); &lt;/P&gt;&lt;P&gt;/* merged cells settings */ &lt;/P&gt;&lt;P&gt;var mergedCells = { s: {r: 0, c: 1}, e: {r: 0, c: 2}}; &lt;/P&gt;&lt;P&gt;if (!ws["!merges"]) ws["!merges"] = []; &lt;/P&gt;&lt;P&gt;ws["!merges"].push(mergedCells); &lt;/P&gt;&lt;P&gt;/* generate workbook */ &lt;/P&gt;&lt;P&gt;var wb = XLSX.utils.book_new(); &lt;/P&gt;&lt;P&gt;XLSX.utils.book_append_sheet(wb, ws, "sheet1"); &lt;/P&gt;&lt;P&gt;XLSX.writeFile(wb, "test.xlsx");&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Thiri&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 00:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/export-excel-with-multiple-headers-using-spreadsheet-in-sapui5/qaa-p/12228424#M4577475</guid>
      <dc:creator>former_member494689</dc:creator>
      <dc:date>2020-07-06T00:54:59Z</dc:date>
    </item>
  </channel>
</rss>

