Answers:
我写了一个简单的AppleScript来做到这一点。
tell application "Numbers"
activate
tell the front document
tell the first sheet
set original_range to selection range of first table
set orignal_table to first table
set number_of_columns to column count of orignal_table
set number_of_rows to row count of orignal_table
set trasposed_table to make new table with properties {row count:number_of_columns, column count:number_of_rows}
repeat with i from 1 to number_of_columns
repeat with j from 1 to number_of_rows
tell orignal_table
set original_value to the value of cell i of row j
end tell
tell trasposed_table
set the value of cell j of row i to original_value
end tell
end repeat
end repeat
end tell
end tell
end tell
在这里您可以找到有关它的更多详细信息。
那些使用最新版本的Numbers的用户可以使用“表格”菜单下的“转置行和列”选项,如在StackExchange上的此答案所示。下图也从该答案中毫不客气地“借用”,以方便参考。
value
含义,即如果要转置的单元格中有公式,则只会转置其输出。公式不会。