Excel Data in loop Automating to Excel Invoice Template

I have two excel files one contains Invoice data and other is a invoice template i need to automate the process to generate the invoice using the data and invoice template and save it as pdf

can anyone please help me with suggestions and ideas.

Hi @bharadwaj.vuppalapati

Use Loop to iterate on the first excel and Keep on Writing the data in the template file after creating a copy of it.

For writing the data use Write cell activity.
That’s the easiest way to do it.

@bharadwaj.vuppalapati,

Try following these steps:

  1. Read Invoice Data from Excel:
  • Use the Excel Application Scope activity to open the Excel file with invoice data.
  • Inside this scope, use the Read Range activity to read the data into a DataTable.
  1. Loop through the DataTable:
  • Use a For Each Row activity to iterate through each row of the DataTable.
  1. Fill in the Invoice Template:
  • Use the Excel Application Scope activity to open the invoice template Excel file.
  • Use Write Cell activities to write the data from each row of the DataTable into the corresponding cells in the invoice template.
  • You can also use the Copy Sheet activity if you need to create a new sheet for each invoice.
  1. Save as PDF:
  • After filling in the invoice template, use the Save As PDF activity or print the Excel sheet as PDF using the Excel application’s print to PDF feature.
  1. Repeat for each Invoice:
  • Make sure the filled template is saved as a new file (e.g., using a unique file name like InvoiceNumber_Date.pdf).

LLM helped me to write this answer

Thanks,
Ashok :slight_smile: