icoder 4 Posted April 3, 2015 Report Share Posted April 3, 2015 Hi,is there anyway to switch the table's row content with columns? or like, let's say i have a table with 40 rows and 8 columns, is there a way to make those rows columns & vice versa? thanks! Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted April 3, 2015 Report Share Posted April 3, 2015 I really don't think this is exactly what you are looking for but you can play with these and see... Otherwise, you will need to loop through either column or row and increment the row/column index and place into a new table. clear table(&row)clear table(&row_newline)clear table(&column_newline)clear table(&column)set(#list, "A,B,C,Dr1a1,r1b1,r1c1,r1d1r2a2,r2b2,r2c2,r2d2", "Global")add list to table as row(&row, 0, 0, $list from text(#list, ","))add list to table as row(&row_newline, 0, 0, $list from text(#list, $new line))add list to table as column(&column, 0, 0, $list from text(#list, ","))alert(&row_newline)add list to table as column(&column_newline, 0, 0, $list from text(#list, $new line))Have fun! CD Quote Link to post Share on other sites
Bot-Factory 602 Posted April 3, 2015 Report Share Posted April 3, 2015 Hi,is there anyway to switch the table's row content with columns? or like, let's say i have a table with 40 rows and 8 columns, is there a way to make those rows columns & vice versa? thanks!Sure. Loop through the old table and create a new one.Innerloop for rows and outerloop for columns. loop (table total columns){loop (table total rows) { read each row 0 - xx from column 0 and write that to row 0 and column 0 - xxx in new table. }} CheersDan Quote Link to post Share on other sites
icoder 4 Posted April 4, 2015 Author Report Share Posted April 4, 2015 Sure. Loop through the old table and create a new one.Innerloop for rows and outerloop for columns. loop (table total columns){loop (table total rows) { read each row 0 - xx from column 0 and write that to row 0 and column 0 - xxx in new table. }} CheersDan I really don't think this is exactly what you are looking for but you can play with these and see... Otherwise, you will need to loop through either column or row and increment the row/column index and place into a new table. clear table(&row)clear table(&row_newline)clear table(&column_newline)clear table(&column)set(#list, "A,B,C,Dr1a1,r1b1,r1c1,r1d1r2a2,r2b2,r2c2,r2d2", "Global")add list to table as row(&row, 0, 0, $list from text(#list, ","))add list to table as row(&row_newline, 0, 0, $list from text(#list, $new line))add list to table as column(&column, 0, 0, $list from text(#list, ","))alert(&row_newline)add list to table as column(&column_newline, 0, 0, $list from text(#list, $new line)) Have fun! CD thank you guys! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.