Export to Excel - Need to generate excel with multiple sheets and based on a template

Hi All,

Our requirement is - We need to show link for Export to excel in tempo report.The generated excel should have multiple sheets and should be based on a template.

How can I achieve this using the link.

OriginalPostID-247417

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    @arkaprobham....We have a shared component for export to excel.

    please check the below forum link,it might help you..
    https://forum.appian.com/suite/tempo/records/item/lIBCLGOdlMUpdGVqWXdQaIKmc9namfw40wErzEXmzH3yx3N5AYkMAR-339QH-l6O3b6BpcrddPA2v_YvXE9jK393Qb0MH7ia_ES6rtkIqpT3Agc/view/summary
  • @sridevik .. Above link got navigated to Records/Appian Software and Documentation/16.3. From there i did not find any relevant to this . Will you please explain ?
  • 0
    Certified Lead Developer
    @arkaprobham....sorry wrong URL

    Please check this URL
    forum.appian.com/.../summary
  • My question was How can I achieve - a link that would be shown in a tempo report and when clicked an excel file will be generated, This excel file will contain multiple sheets and would be based on a template.
  • I have gone through the above url . we can generate link for the excel but it will not create multiple Sheets
  • @arkaprobham To the best of my knowledge, the plugin mentioned above isn't a complete solution to your question. The smart service 'Export CDT data to Excel' smart service from it might help you generating the Excel sheet and populate the data in multiple sheets.

    Until and unless I miss something, there isn't a way to do it by clicking the Link when you make use of the above mentioned Shared Component. The plugin has few options to export the data by means of Servlets, but I believe they are really limited. Two of them(ExportReportDataToExcelServlet and ExportReportDataToExcelServlet2) deals with Process Report and the other(GetDataSubsetDownloadLinkFromProcess) deals with exporting data from Process but I am not able to see any Sheet inputs here which your use case requires. So I believe either of these Servlets may not be of great use to you. Further if you visit the code, a 60 seconds timeout limit is mentioned in the Servlet(GetDataSubsetDownloadLinkFromProcess) and afaik exporting the data into sheets may take more time in most cases and the plugin may timeout here. I see only these three Servlets and I don't see a use of these really to accomplish your use case.

    When it comes to Smart Services, you need to initiate a Process using Link, but this Link will not give you a download option directly.

    I think you may do something as follows:

    1. Trigger a process(Using Start Process function or Start Process Writer Shared Component, depending on the Appian version) from Report and export the data to Excel by using 'Export CDT data to Excel'.
    2. Upon the completion of the process, send a task to User with an option to download the files. Also notify the User that the process is complete and the documents are ready for download. Also you can have a button on the Report which refreshes the interface and polls for the task (or may prefer to store in DB and query the same) to know about the documents generated in the recently triggered process for the logged in User and for the corresponding report and then show the resultant documents.
  • You can generate an Excel spreadsheet with multiple sheets using the recommended plugin in a process model, but in my experience you will need to create each sheet using a separate smart service node - so create the file with a first sheet then add each additional sheet to the file.
  • 0
    Certified Senior Developer
    @rrobins is right - create the file in the first node (with Sheet_number = 0 for the data inputs) and save the 'Output_document' in the data outputs as a pv. Then - in the next smart service node - start on Sheet_number = 1 and use the pv as the value for 'Document_to_overwrite' - saving the Output_document again as the pv...continue until you have all the tabs populated, overwriting the document (pv) each time.