This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 05-08-201307:50 AM- edited
a week ago
How do I output to an Excel template file?
It is possible to output your data to an existing Excel document that already has modified formats and column names. For example, the below Excel file has existing data in the first 4 rows. If you wanted to add addresses to this file while keeping the first 4 rows, the first step would be to highlight the area you want to write to. If you don’t know the exact length/width of your data, I would recommend going large:
Once you have your desired area highlighted, right-click and choose the Define Name… option:
A popup box will appear, enter in a name of your choosing and click OK:
You also need to make sure that the sheet you are saving to doesn’t contain any spaces in the sheet name. Once verified, save the template and close out:
Below is an example of the sample data that will be added to the above template:
In Alteryx, use a Input tool to point to the data you would like to use to update the template file:
In the Output, you will want to choose the template file, which will cause the below message to appear, choose yes to overwrite:
When saving to Excel, the below window will popup, enter the name you used for the range you highlighted in the template file:
After clicking OK, the Output configuration area will populate. Change the Output Options to Delete Data & Append:
You can now run the module. Once the module is finished, you can open the updated template file, you should see your previously formatted rows/columns plus the new data you wanted to append:
If you set a format to the range you named (color, text style, bold, etc), Excel will keep it so that the data you are writing to the file will appear with the specified format.