Store content from array to Spread_sheet using perl

How to store the content from array to either "row-column" or "column-row" order?