Office アドイン

Office Scripts機能によってWeb版Officeの操作を自動化する

前回Ignite 2019で発表されたPower Automate(旧名:Microsoft Flow)のUIフローについて紹介しましたが、今回のIgniteではOffice開発絡みでもう一つ大きな発表がありました。
それが「Office Scripts」です。

Office Scriptsの概要

Excel Blogには、Office Scriptsは下記のように紹介されています。

Office Scripts is a feature that enables users from those of novice Excel experience to those with advanced coding expertise to record scripts and automate their tasks. The feature will be available as public preview on Excel on the web by the end of 2019. Once Office Scripts is available, users can get started by clicking the Record button in the Automate tab, recording the actions desired, stopping the recorder, and then saving the script. The script is saved to OneDrive for Business, which allows them to be easily reused across workbooks. After recording a script or choosing one that was already created, a user can run the script in one of three ways: manually starting the script from within Excel on the web, automatically in a flow on a schedule, or conditionally in a flow based on a trigger.

For users who do have coding experience, Office Scripts also allows you to take recorded scripts and extend them using the same Excel JavaScript APIs that are available in Office Add-ins.

https://techcommunity.microsoft.com/t5/Excel-Blog/Excel-Announcements-Ignite-2019/ba-p/964482 より

要するに、

  • 「マクロの記録」機能のように、Web版のExcel(Excel for web)の操作を記録できる。
  • 2019年末までにプレビュー版が公開される。
  • 「Automate」タブから操作の記録と停止が行え、スクリプトとして記録される。
  • スクリプトはOneDrive for Businessに保存される。
  • Office アドインと同じExcel JavaScript APIsでスクリプトを拡張できる。

というのが大きな特徴でしょう。

また、Igniteのセッション「Office Scripts: Power your organization with solutions built in Excel」の動画をザックリみたところ、下記のような発言がありました。

  • Office ScriptsはVBAのように、ガチ開発者向けではなくエンドユーザー向けの立ち位置。
  • Power Automateからスクリプトを実行できる。
  • スクリプトはJavaScript(TypeScript)でコーディング可能。
  • IT管理者はスクリプトの共有を集中管理できる。
  • “VBAは死んでいない”
  • “我々の目指すゴールは、モダンなオンラインでのコラボレーション環境にフォーカスすることだ。”

恐らく今後は、Excel以外のOfficeアプリケーションでも展開されていくことでしょう。
Office アドインで進化してきたJavaScript API for OfficeがOffice Scriptsで活きる!、なんという胸熱な展開でしょう!!
今から触るのが楽しみです。

Office ScriptsはVBAを置き換えるものではない

2020/1/8 追記です。
下記記事でも書きましたが、Office ScriptsはExcel名前空間を介してブックやシートを制御します。

逆に言えば、Office Scriptsで出来ることはこの範囲ということになるため、WordやPowerPointといった他アプリケーションの制御やWindows APIの呼び出しまで行えるVBA程のことは、現時点ではできません。

ただ、Office Scriptsの兄弟的機能である「Office アドイン」が登場した2012年頃に比べると、JavaScript APIで出来ることは遥かに増えていますし、WordPowerPoint向けのAPIはすでに用意されているので、将来的にはOffice ScriptsでWord文書やスライドの制御ができるようになるかもしれません。
(個人的には、そうなってほしいと思っています。)

参考Webサイト

関連記事

Power AutomateのUIフローを試してみました。前のページ

Windows 10 November 2019 UpdateをISO形式でダウンロードして実機にインストールしてみました。次のページ

関連記事

  1. Office関連

    Officeファイルから作成者などのプロパティを取得するVBScript

    下記記事でも書いていますが、xlsxやdocxといった、OOXML形式…

  2. Office関連

    選択中の図形の文字列を蛍光ペンでハイライトするPowerPointマクロ

    MSDNフォーラムに「PowerPoint 2016で、マクロで選択中…

  3. Office関連

    Excel Services JavaScript APIを試してみました(1)

    前回の記事で紹介した「ExcelMashup.com」、このサイトによ…

  4. Office関連

    IEサポート終了でVBAマクロはどうなるの?

    ※下記情報は2021年5月時点の情報で、今後状況が変わっていく可能性が…

  5. Office アドイン

    [Office用アプリ]Mashup Awards 9にOffice 用アプリで応募できる!?

    日本最大級のWebアプリケーション開発コンテスト「Mashup Awa…

コメント

  • コメント (0)

  • トラックバックは利用できません。

  1. この記事へのコメントはありません。

Time limit is exhausted. Please reload CAPTCHA.

※本ページはプロモーションが含まれています。

Translate

最近の記事

アーカイブ

PAGE TOP