I have a requirement where the column headers of the excel should be populated dynamically for which the values will be present in one Data Page. The row values of the excel are present in a different Data page. Is there a way to pass two different page lists to the OOTB activity MSOGenerateExcelFile to generate a excel file.
Thanks for your assistance but unfortunately the scenario I am trying to implement is different. For my scenario, for one file there may be 4 columns as header, for another file there may be 10 columns as header and the user has option to change the header numbers in UI and the corresponding values should be exported in excel.
I was able to achieve the desired functionality by manipulating the data and using the pega OOTB activity "ExportToExcel". To those who do not know about this activity I will explain the working of the same. This activity takes the parameter "pyFileData" which should contain the data stream that needs to be processed and exported to the excel.
If you add "\n" in to the parameter "pyFileData" like "First Line"+"\n"+"Second Line", then the text "First Line" will be displayed in the first row of the excel and "\n" makes the text "Second Line" to move into the second row of the excel.
Similarly if "\t" is given the data will be moved to next cell in the same row. You can manipulate the data and accordingly use "\n" and "\t" to fine tune on how the data should be displayed in the excel.