Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transpose sheet with POI SS/XSSF?

I am using POI XSSF API and I would like to transpose a sheet.

how can I do that?

Thanks.

like image 755
Yoni Avatar asked May 03 '11 22:05

Yoni


1 Answers

Transpose, as in swap A2 with B1 and A3 with C1 (so columns become rows)?

If so, there's nothing built in, so you'd need to do a little bit of coding yourself. You'd likely want to grab a pair of cells, save the contents of one (value and style), copy the second to the first, then overwrite the second.

See the quick guide if you're not sure on all the reading/writing parts.

like image 72
Gagravarr Avatar answered Oct 05 '22 07:10

Gagravarr