Slpitting Excel

vinay

Member
Hi, Can anyone tell me how to split the Excel Sheets? Suppose i have 50 records in Sheet1 i have to slpit it into 2 sheets as 25 records in Sheet2 and 25 records in Sheet3 like this
 
I hope this works
1. Put them in a collection
2.Create a new excel
3.Paste ur collection in this new excel with corresponding sheets.

Hope, this works fine.
 
Forgotten to tell u
Use split collections from Utility Collection Manipulation and then u can dump ur req collection into your req sheet.
Hope this helps.
 

VJR

Well-Known Member
Hi @vinay,

Here is what @bharadwaj813 is suggesting to convey.
Be noted that this is not fully tested and works well under general conditions. You need to check all possible scenarios: 1 row in excel, 0 rows in excel, etc.

2.jpg Output Stored in 'Number of rows' data item
4.jpg Output Stored in collection called 'Data'
5.jpg Output stored in collection called 'Output Collection'
7.jpg Output stored in the same collection called 'Output Collection'
 

Attachments

  • 1. InputSheet.JPG
    1. InputSheet.JPG
    27.1 KB · Views: 38
  • 2. Calculate Total rows.JPG
    2. Calculate Total rows.JPG
    32.3 KB · Views: 39
  • 3. Rounding Rows.JPG
    3. Rounding Rows.JPG
    27.5 KB · Views: 40
  • 4. Get Sheet1 as collection.JPG
    4. Get Sheet1 as collection.JPG
    32.6 KB · Views: 41
  • 5. Copy 1st split.JPG
    5. Copy 1st split.JPG
    31.7 KB · Views: 41
  • 6. Write to Sheet2.JPG
    6. Write to Sheet2.JPG
    36.5 KB · Views: 35
  • 7. Copy 2nd Split.JPG
    7. Copy 2nd Split.JPG
    37 KB · Views: 34
  • 8. Write to Sheet3.JPG
    8. Write to Sheet3.JPG
    39.4 KB · Views: 33
  • 9. Output Sheet2.JPG
    9. Output Sheet2.JPG
    22.1 KB · Views: 29
  • 10. Output Sheet3.JPG
    10. Output Sheet3.JPG
    22.2 KB · Views: 28
Last edited:

VJR

Well-Known Member
Another easier approach is as below.
You still need to make amendments for scenarios like 1 row in excel, 0 rows in excel, etc.
To do that simply add a Decision and Calc stage to adjust the SplitTotalRows depending on the Total Rows returned.
Make use of the Copy Paste Worksheet Range.
Copy Header and then Data to the corresponding sheets.
 

Attachments

  • 1. Diagram.JPG
    1. Diagram.JPG
    34.6 KB · Views: 50
  • 2. Copy Header to 1st Sheet.JPG
    2. Copy Header to 1st Sheet.JPG
    43.3 KB · Views: 46
  • 3. Copy Data to 1st Sheet.JPG
    3. Copy Data to 1st Sheet.JPG
    43.8 KB · Views: 40
  • 4. Copy Header to 2nd Sheet.JPG
    4. Copy Header to 2nd Sheet.JPG
    42.6 KB · Views: 38
  • 5. Copy Data to 2nd sheet.JPG
    5. Copy Data to 2nd sheet.JPG
    48.5 KB · Views: 39
Last edited:

vinay

Member
Another easier approach is as below.
You still need to make amendments for scenarios like 1 row in excel, 0 rows in excel, etc.
To do that simply add a Decision and Calc stage to adjust the SplitTotalRows depending on the Total Rows returned.
Make use of the Copy Paste Worksheet Range.
Copy Header and then Data to the corresponding sheets.
Can u give logic for Calculate rows and round no.of rows? i mean screen shots of those
 

vinay

Member
Another easier approach is as below.
You still need to make amendments for scenarios like 1 row in excel, 0 rows in excel, etc.
To do that simply add a Decision and Calc stage to adjust the SplitTotalRows depending on the Total Rows returned.
Make use of the Copy Paste Worksheet Range.
Copy Header and then Data to the corresponding sheets.
Got It Bro...thankyou
 
Top