If it is for a datamigration task, you might consider your friendly spreadsheet if the size is not too big.
For matrix manipulation stuff there is the jScience library which has matrix support. For just transposing a metrix this would be overkill, but it depends what needs to be done with it.