Hi Everyone ,
Problem Statement: I have 100 rows of data with 10+ Columns, I want to write this data into different sheets based on Column field State, my Challenge is here we have pre-defined columns required for each state. I need only those columns for each state sheet.
Approach now : we are using Filter to get each state and using select tool to get the data.
DO we have any better approach than this .?
Hey @saiirangam,
You can use a single output tool to write all different sheets. The "Take Table Name From Field" Option allows you to do so. This creates a sheet for every group.
Thank you , Lemme rephrase my question
I need to pick different columns from the incoming data base don the select I am writing into , all the sheets will not have same data
If it's a unique selection of columns for each value in the State column, then you'll likely have to do each one separately. Otherwise for any that are the same, the approach by @FrederikE is your best bet
You might be able to use a Dynamic Select built into a Batch Macro, but only if you have the list of columns to be selected for each unique State value
@saiirangam From what I understand, I think you're trying to achieve this:
Take note of the grouping column in my sample data, that's emulating your 'State' column.
I want 3 separate sheets within one excel workbook. I want a tab for each group, and on each tab, I only want certain columns:
I've attached a workflow. Download it, give it a run & check the output Excel file. See if it's achieving what you want. I basically said, group 1 should only have field 2, group 2 should only have field 3 etc. You can change the desired columns in the Select tools.
All the best,
BS
@saiirangam
I think the best approach here is to make a batch macro. You can use the dynamic select to just keep the columns you want per state
From a lookup like this:
You can feed this into the control parameter to update the dynamic select in the batch macro
Make sure you group by your state field in the batch macro configuration
This filters the input of the macro to where the state is identical to the control parameter.
Hope this helps,
Ollie