Output - Overwrite Specific Columns, Not Entire Sheet
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am trying to produce an output from Alteryx, that only overwrites the data in certain columns. The reason being the end columns contain some previous formatting in Excel. I have attached an example output.
From this example, I would ideally like Alteryx to only overwrite columns A - F with the data.
My flow and output will always contain the same amount of columns, so if I specified A-F there would be no issues of it having extra columns added later down the line. I am unable however to determine the number rows in the output as this number will change frequently.
Please may someone advise if this is possible, and explain how I do this? I have tried using Overwrite Sheet or Range and specify which range but it won't work.
Thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can set the range only as column range. This way row range is dynamic/infinite (i,e not be worried about)
Snap:
or
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Lauren_Holmes Add a Count Record to count the number of records then use a formuila tool to create the path and the range if the records are dynamic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If I understand the ask you need to write to a range, but don't know the whole range ahead of time due to the number of rows in the data. If this is correct you can:
- Have the file name as part of your data.
- Modify the file name once you know how many rows there are.
- Specify the file name, for example: \\PathToFile\FileNameWithExtension|||'WorksheetName$T3:AF6'
- T3:AF6 is a range. Have a function to modify this based on how many rows are in your data (start row + count of rows in the data - 1 if column headers are not to be written)
- Note: The $ must be there - it is not part of the range itself
- Have the OutputData tool take the file name from the input.
- Check Take File/Table Name From Field
- Select Change Entire File Path from the drop down
- Uncheck Keep Field in Output unless you want the file name in a column of your data
- Specify the field in the input that contains the file name from step 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
Thank you. When I do this however, it works, but the old records do not get removed:
My issue is, i don't know how many new rows there will be each time it is ran - sometimes there will be more, and sometimes there will be less.
Is there a way to have it so it removes these extra rows?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Write to a large range like below that way all the value below will also be removed. 1,048,576 rows is max allowed rows in excel.
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Would it be possible for you to amend this flow please? I have added 99999 onto the end of "F" but I still cannot get it to remove the other rows from previous run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Dont do filepath change thing. Just set the workflow like this. This will work
Hope this helps : )
