« [Excel]テキスト形式でのペースト | トップページ | [Excel]12ptエクセル方眼 »

[Excel]ナンバーフォーマット

ダウンロード - e3838ae383b3e3838fe38299e383bce38395e382a9e383bce3839ee38383e38388.zip

ポイントは、カスタムフォーマットになるって所でしょうか?



選択範囲を標準に.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "General"
end tell
end tell
end tell
end tell
end tell
end repeat



選択範囲を文字列に.scpt

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "@"
end tell
end tell
end tell
end tell
end tell

end repeat



選択範囲を大字.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "[DBNum2][$-411]General"
end tell
end tell
end tell
end tell
end tell

end repeat



選択範囲を全角.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "[DBNum3][$-411]0"


end tell
end tell
end tell
end tell
end tell

end repeat



選択範囲を漢数字.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "[DBNum1][$-411]General"
end tell
end tell
end tell
end tell
end tell

end repeat



選択範囲を¥マーク区切りカンマ付き.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "¥#,##0"
end tell
end tell
end tell
end tell
end tell

end repeat



選択範囲に正負記号.scpt
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use scripting additions

tell application "Microsoft Excel"
set objSelectionCell to cells of selection
end tell


repeat with objCell in objSelectionCell

tell application "Microsoft Excel"
tell window 1
tell active workbook
tell active sheet
tell objCell
set number format to "\"△\" #,##0;\"▲\" #,##0"


end tell
end tell
end tell
end tell
end tell

end repeat

|

« [Excel]テキスト形式でのペースト | トップページ | [Excel]12ptエクセル方眼 »

AppleScript Microsoft」カテゴリの記事