Hi! How can I extract the rows between Class A and standard without specifying the exact cell position then write it to another excel sheet? Next, repeat the process again for Class B. Thank You.
Hi @Krystal ,
Would you be so kind as to make this sample template available to us so that we can run some tests and come up with an end-to-end resolution?
Kind Regards,
Ashwin A.K
Hi @Krystal ,
Is this the expected output?
SplitExcelDataFromSingleSheet.xaml (11.8 KB)
Kind Regards,
Ashwin A.K
Thanks a lot. This is what I want. But instead of writing it one by one, is it possible to do it in a faster way because I have a lot more data afterwards?
And I have another question, if I only want to extract columns A (if column A is empty then need to extract column B)and C further to a new sheet, how to get this done?
Below is the expected output.
Hi
Hope the below steps would help you resolve this
-
Use a excel application scope and pass filepath as input and inside the scope use a read range activity and get the output as dt
-
Then use a Build datatable activity and create two columns named “Name” and “Value” and get the output as Finaldt
-
Use a clear datatable activity and pass Finaldt as input
-
Then use a For each row activity and pass dt as input
-
Inside the loop use a If condition like this
NOT String.IsNullOrEmpty(CurrentRow(0).ToString.Trim)
If true it goes to then block where use a ADD DATAROW activity and mention datatable as Finaldt and array row as {Currentrow(0).ToString, CurrentRow(2).ToString}
If false which means first column has null value then it goes to else block where use a add Datarow activity like this
{Currentrow(1).ToString, CurrentRow(2).ToString}
- Now outside the loop use a WRITE RANGE activity and pass Finaldt as input and this will contain the value you need
This can be repeated for class B as well
Cheers @Krystal
Hi @Krystal ,
Then you could pass in an array of the classes you want to extract like so:
As for speeding up the writing process, that won’t be possible since each dataset has to end up in a separate Excel File.
SplitExcelDataFromSingleSheet_v1.xaml (18.5 KB)
Kind Regards,
Ashwin A.K
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.