Excel tools export sql to excel multiple sheets

Hello, 

 

does anyone can provide an example of the parameters for Export SQL to Excel to generate a file with two or more sheets? 

 

Thanks in advance.

  Discussion posts and replies are publicly visible

  • Please find the attached screenshot for inputs:

    Configure the below inputs in the first Export SQL to Excel node

    Excel base template -Map the base template with multiple sheets (like SheetA,Sheet B) which was already uploaded in the folder.

    SQL - Pass the sql query

    Sheet Number = 0(for Sheet A)

    Starting Cell -"A2"

    Document name=Name of the document

    JNDI Name=datasource name(jdbc/AppianBusinessDS)

    Save the output of the node in a process variable of type document (pv!generatedDocument) and pass the document to the the next Export SQL to Excel

     

    Inputs to the second node:

    Excel base template -pv!generatedDocument

    SQL - Pass the sql query

    Sheet Number = 1(for Sheet B)

    Starting Cell -"A2"

    JNDI Name=datasource name(jdbc/AppianBusinessDS)

    If you have multiple sheets in the excel, repeat the steps above.

    Thanks!

  • +1
    Certified Lead Developer

    Hi Martin Camacho (martind465) ,

    1. Prepare the template of excel sheet to generate.
    2. For the node excel from sql, pass sheet number as 0, template and other required parameters and capture the generated document in node output as append the generated document to pv of Document list.
    3. for the next sheet on wards, re execute the same node by incrementing the sheet number and generated document in prev execution of node as template.
    4. Delete the docuemnts i.e., pv of document list
  •  I am trying to create multiple sheet excel by  following above steps, but getting  error on mapping Excel_Base_Template 

    Error : "The  following error was raised by the Export to Excel function:  Cannot write data, document seems to have been closed already"

    Have you ever seen this error?

    can you provide some insight on how to resolve this

    Thanks