-
Notifications
You must be signed in to change notification settings - Fork 1
Working with rows
Morten Laukvik edited this page Oct 29, 2016
·
1 revision
Adding a new row with data
CSV csv = new CSV();
StringColumn president = csv.addColumn("President");
StringColumn party = csv.addColumn("Party");
csv.addRow().update(president, "Barack Obama").update(party, "Democratic");
Moving a row up or down
csv.moveRow( 1, 2 );
Swapping two rows
csv.swapRows( 1, 2 );
Removing rows
csv.removeRow( 5 );
Removing rows between range
csv.removeRows( 5, 10 );
Finding the index
csv.indexOf( row );
Inserting row at a specific index
CSV csv = new CSV();
StringColumn president = csv.addStringColumn("President");
csv.addRow(0).update(president, "Barak Obama");