I am trying to manipulate a table of data originally I wanted to work out she Excel but at present I cannot get it to work in Excel. The test in the following script is to reverse the order of the columns Last one first Last but one second and so on. The table I thought I was building is called Revised list and it is supposed to be pasted to a new worksheet in reverse order. From a 9 by 11 matrix it enters one row of N/A
tell application "Microsoft Excel"
set OriginalList to value of used range of active sheet
set RowCount to count of OriginalList
set ColCount to count item 1 of OriginalList
set FirstCell to (get address of cell 1 of column (ColCount))
set LastCell to get address of cell RowCount of column (ColCount)
end tell
set RevisedList to {}
repeat with x from ColCount to 1 by -1
tell application "Microsoft Excel"
set FirstCell2 to (get address of cell 1 of column x)
set LastCell2 to (get address of cell RowCount of column x)
set CurrCol to value of range (FirstCell2 & ":" & LastCell2)
set end of RevisedList to CurrCol
log CurrCol
end tell
end repeat
log RevisedList
tell application "Microsoft Excel"
make new worksheet at after last sheet of active workbook --Sheet to transfer data to
set value of range ("A1:" & LastCell) to RevisedList
end tell