We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Generating multiple invoices based on a template per unique record

thombckr
5 - Atom

Hi all,

 

I am attempting to replicate a VBA code in Alteryx.  This code fills out a template based the information located in a table, with each record corresponding to a new template.   Each cell within that record corresponds to a different cell on the template.   Currently, in excel, a new sheet is created for each template.  I then select all of the templates and save them as a pdf so that each template represents a new page in the output pdf.  I do not need each template in an excel file as a sheet, that is just an intermediary step and could be skipped in Alteryx.

 

Here is the example of the code that runs that in VBA:

 

Sub CreateSheetsWithTemplateAndData()
Dim cell As Range
Dim templateSheet As Worksheet
Set templateSheet = ThisWorkbook.Sheets("Invoice Template")
For Each cell In Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row)
templateSheet.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = cell.Value
ActiveSheet.Range("B3").Value = cell.Offset(0, 22).Value 'Copy data from column V (Recevier Company Name) to cell B3 in the new sheet
ActiveSheet.Range("B4").Value = cell.Offset(0, 23).Value 'Copy data from column W (Recevier Address #1) to cell B3 in the new sheet
ActiveSheet.Range("G11").Value = cell.Offset(0, 22).Value 'Copy data from column V (Recevier Company Name) to cell G11 in the new sheet
ActiveSheet.Range("G12").Value = cell.Offset(0, 23).Value 'Copy data from column W (Recevier Address #1) to cell G12 in the new sheet
ActiveSheet.Range("B11").Value = cell.Offset(0, 17).Value 'Copy data from column R (Sender Company Name #1) to cell B11 in the new sheet
ActiveSheet.Range("B12").Value = cell.Offset(0, 18).Value 'Copy data from column S (Sender Address #1) to cell B12 in the new sheet
ActiveSheet.Range("H5").Value = cell.Offset(0, 16).Value 'Copy data from column Q (Service Period) to cell H5 in the new sheet
ActiveSheet.Range("K39").Value = cell.Offset(0, 11).Value 'Copy data from column L (Amount) to cell K39 in the new sheet
Next cell
End Sub

 

Is there anyway to recreate this Alteryx?  I have looked into Blob tools but I am not familiar enough with them to understand if they will work for my purpose.

 

0 REPLIES 0
Labels
Top Solution Authors