Excel ファイルを開く
動詞: excelOpen
使用可能: < Standard>
Excel ファイルを開きます。
構文
excelOpen --file(String) [--passwordtopen(String)] [--passwordtomodify(String)] [--usetemplate(Boolean)] --template(String) [--savechanges(Boolean)] [--notcalculate(Boolean)] (Boolean)=success (String)=reason (Excel)=value
入力
| スクリプト | Designer | 必須 | 許容タイプ | 説明 |
|---|---|---|---|---|
| -- ファイル | ファイル | 必須 | テキスト | Excel ファイルへのパス。 |
| --passwordtopen | 読み取りパスワード | オプション | テキスト | ファイルの内容の読み取りのみを許可するパスワード。 |
| --passwordtomodify | 変更パスワード | オプション | テキスト | ファイルの内容の変更を許可するパスワード。 |
| --usetemplate | テンプレートの使用 | オプション | Boolean | Excel ファイルを開くときに既存のテンプレートを使用するオプション。 |
| -- テンプレート | テンプレート | 「テンプレートを使用」が「True」の場合のみ | テキスト | Excel ファイル・インターフェースの新規テンプレートを定義します。 |
| --savechanges | 変更の保存 | オプション | Boolean | 実行中に、変更が発生するごとに Excel ファイルを保存します。 |
| --notcalculate | 計算しない | オプション | Boolean | 変更を保存する前に、Excel ファイルに含まれている数式を計算しません。 |
出力
| スクリプト | Designer | 許容タイプ | 説明 |
|---|---|---|---|
| success | 成功 | Boolean | ファイルが開いた場合は「True」、そうでない場合は「False」が返されます。 |
| 理由 | 理由 | テキスト | 「成功」 パラメーターで取得された戻り値の正当性を示す理由。 |
| 値 | ファイル | Excel | 使用された Excel ファイルを含む変数が返されます。 |
例
Excel ファイルを開き、開いたファイルを「excelFile」という名前の変数に返します。
defVar --name excelFile --type Excel
excelOpen --file "excelFileTable.xlsx" excelFile=value
// Result: Stores the opened excel file in the excelFile variable to use it in the script.
ファイルをダウンロード
サンプル・スクリプトを実行するには、ファイルをダウンロードして、Excel ファイルを開く で、ファイルを保存したパスを入力する必要があります。
注釈
コマンドが機能するためには、 「Excel ファイルを開く」 コマンドの実行で参照されるファイルを閉じる * * 必要があります。
Excel を閉じるコマンドで、開いていた Excel ファイルを閉じます。