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.
I am currently working on a WF where I have the set of data in different tables and I need to put this data into a specified range of a same excel template file which has different sections. The output tool does not have a functionality to choose the which range the data should be inserted. Can someone help me in this? Here is the screenshot of excel template with different sections (each section data is a different table in Sql server).
Writing to a range in a spreadsheet is very similar to writing to a sheet, you specify the range name (without a $ at the end) in the filename. I always make sure that the column names in my output dataset is exactly the same as the column names in my range and then use the "Append Field Map By Field Name" option. The fields should then automatically map to the right fields in the range. You can also map them manually.
your solution worked for me, but it is inserting the column header as well which it should not do, because we already have the column headers in the existing template. And it overwriting the column headers if I give the range as C1:D40; and if I give the range as C2:D40 then it is writing another row for the column header. Is there any way we can skip the column header and write only the data?
I have attached the screen shots of it, please have a look.
One way to do it is to place a dynamic rename tool in front of the output data tool with the option "Take Field Names from First Row of Data" and write to range C2:D40. This will make the 1st row of data your column header, which then gets written to the range.
Thanks for the information, however i have a little discrepancy in my output while using the 'Dynamic Rename' tool.
in my template i have blank columns in between each field, while using the rename tool to took off the field header, the blank columns are getting updated with new field header like Field13, Field14 etc,. is there anyway to aviod the blank column headers?