Script Help

I would like to swich the study table cells so that each cell(a,b) goes to cell(b,a) because of limitation I cannot transfer the cell size I got. The column numbers are too high to transfer to excel so if I can transpose it, it would be a lot of help!