Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Currently i have done coding like the IPs were saving in an excel sheet.

But i need to save the IPs based on IP segments in different excel worksheets.

Please see the below example.

IP segment

10.1.1.1
10.1.1.2
10.1.1.3
10.1.2.1
10.1.2.2
10.1.2.3
10.1.3.1
10.1.3.2
10.2.3.3

At present, the above IP segments were saving in same excel sheets. But i require data's as below format in different worksheets.

IP segment 1

10.1.1.1
10.1.1.2
10.1.1.3

IP segment 2

10.1.2.1
10.1.2.2
10.1.2.3

IP segment 3

10.1.3.1
10.1.3.2
10.2.3.3

Please help.
Posted
Updated 29-Jun-14 20:27pm
v2
Comments
superselector 30-Jun-14 8:41am    
Hi Kamal Kannan,

you can do like this

1. import all the data to one table(original datatable)
2. Copy the data to another table
3. find distinct segments Name
4. for each segment, loop through the original datatable
4. create a new datatable by cloining the original datatable and add rows for matching Segment Name and export the datatable to csv in foreach loop itself

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900