複数のシートにある表の統合
複数のシートにある複数の表を統合して1枚の表を作成できないでしょうか。
MacBook Air (11-inch Late 2010), Mac OS X (10.7.4)
複数のシートにある複数の表を統合して1枚の表を作成できないでしょうか。
MacBook Air (11-inch Late 2010), Mac OS X (10.7.4)
度々、失礼致します。 書類中の全ての表を統合するAppleScriptを作ってみました(下記)。 編集するNumbersの書類を最前面に表示した状態で実行します。 かなり動作が遅いですが、なんとか動きます。 実行すると新しいシートに統合した表が作成されます。 なるべくスマートな内容にしたかったのですが、現在の私にはこれが精一杯です。 参考になれば幸いです。
(サポートコミュニティーの皆様、もっと巧い書き方があれば教えて下さい。宜しくお願い申し上げます。)
tell document 1 of application "Numbers"
set NSheets to countsheets
set NTables to counttables of sheets
set NRows to countrows of tables of sheets
makenewsheet
set TheTable to table 1 of the last sheet
set row count of TheTable to NRows
set l to 1 as integer
repeat with h from 1 to NSheets
tell sheet h
repeat with i from 1 to count tables
tell table i
if column count > column count of TheTable then
set the column count of TheTable to column count
end if
repeat with j from 1 to row count
repeat with k from 1 to column count
set theValue to value of cell k of row j
set value of cell k of row l of TheTable to theValue as text
end repeat
set l to l + 1
end repeat
end tell
end repeat
end tell
end repeat
end tell
T22T様
御高配ありがとうございます。
AppleScriptまで作成していただきまことにありがとうございます。
他に自分がやった方法としては、
第1のシートをCSVファイルで書き出し、
その書類をFMproで開き、第2、第3のシートを
FMproのインポートで取り込むと、
1つの書類にまとめられました。
さらにこれを、excel形式で書き出すことで
numbers書類として開くことができました。
原始的な方法ですがご参考ください。
参照はできなくてもかまいません。
のちのち参照しなくても良い(元のシートの数値を更新した時に統合したシートの当該箇所が更新されなくても良い)のであればコピペが一番早いと思いますよ。
ご回答ありがとうございます。
あきらめがつきました。
早速取りかかります。
ご回答ありがとうございます。
たしかに作業がはかどります。
ありがとうございます。
訂正(早速ですが): 3行目のNTablesの変数の設定は不要でした(お恥ずかしい)。
複数のシートにある表の統合