I have an excel file consisting all data. I wanted to split them into different files. for example:
In the above case, there should be 3 Files (Output)
Team A.xlsx
Team B.xlsx
Team C.xlsx
Note that the header should be retained.
I have an excel file consisting all data. I wanted to split them into different files. for example:
In the above case, there should be 3 Files (Output)
Team A.xlsx
Team B.xlsx
Team C.xlsx
Note that the header should be retained.
Hi @raisonne ,
Could you Check with the below Steps :
Assign
Activity :TeamDict = new Dictionary(Of String,Datatable)
Assign
Activity like belowTeamDict = DT.AsEnumerable.GroupBy(Function(x)x("TEAM").ToString).ToDictionary(Function(x)x.First.Item("TEAM").ToString,Function(y)y.CopyToDataTable)
TeamDict
and Write the Data to separate Excel Files like shown below :Let us know if you are not able to implement this or facing issues.
getting this eeror
Hey
it was just an example how it would work, you have to add the create file activity for reach row and the write range in the created file, you will to change properties as yours needs
Regards
Can’t follow this. . .
Selecting the Required Dictionary Key Value Types can be done as shown below :
Click on Browse For Types.
Type Dictionary and Select the Highlighted Type from the List :
Next, Specify the type and click on Ok.
How to set Team as Group?
Could you let us know if you were able to implement it ? Is there any issue or errors you are facing?
Still trying to understand the instruction. . .getting a lot of errors
Let us know the Errors that you receive, so that we can help you further in correcting it.
Additionally, You could also show us the Screenshot of your completed Implementation.
It seems to be the right data type, Could you maybe try Cut the Assign Activity and Paste it again and Check whether it is able to resolve the errors. Also, assuming that the dtInitial
is a Datatable type variable.
Correct, it’s a Datatable. The Value should only be this, right?
dtInitial.AsEnumerable.GroupBy(Function(x)x(“Service Territory 2”).ToString).ToDictionary(Function(x)x.First.Item(“Service Territory 2”).ToString,Function(y)y.CopyToDataTable)
it seems like ok already