San*_*eef 8 mac iwork iwork-numbers
我想转置一个表(将行交换为列,反之亦然)。如何在 iWork Numbers 中做到这一点。
小智 4
我写了一个简单的 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
Run Code Online (Sandbox Code Playgroud)
在这里您可以找到有关它的更多详细信息。
| 归档时间: |
|
| 查看次数: |
19786 次 |
| 最近记录: |