メインコンテンツへスキップ

Excel 人口 Power Automate

このアクションが何をするか

PDF4me Excel - 人口を増やす をマージする JSON ペイロードを Excel テンプレート Asposeスマートマーカー フィールドと入力済みの値を返す .xlsx 添付、保存、送信の準備ができました。テンプレートをマッピングします SharePoint、 OneDrive、またはDataverse、貼り付けまたは構築 JSON 動的コンテンツから、入力済みのワークブックをパイプして SharePoint ファイルを作成する、 Outlook メールを送信する、 OneDrive ファイルを作成する、 データバースで新しい行を追加、 または チーム メッセージを投稿する複数シートのワークブック、数式の再計算、地域に応じた数値/日付の書式設定が、単一の操作で処理されます。

関連ブログ記事(2)
Power AutomateでJSONからExcelテンプレートにデータを入力する:Aspose Smart Markersを使用した4ステップのDropboxワークフロー
Power Automate のエンドツーエンドのフロー:Dropbox から Aspose Smart Marker の .xlsx テンプレートを取得し、ネストされた RootData.Items JSON ペイロードを PDF4me Excel - Populate とマージし、入力済みのワークブックを Dropbox にアップロードします。実際のスクリーンショット、正確なフィールド値、ダウンロード可能なテンプレートと JSON が含まれています。
投稿を読む →
Power Automate の Excel 請求書テンプレート: SharePoint リストから入力し、PDF4me を使用してすべての請求書を PDF/A としてアーカイブします
PDF4meを使ったExcel請求書テンプレートの自動化。SharePointリストに新しいアイテムが追加されるたびに、テンプレートが自動的に入力され、圧縮されたPDF/A形式の請求書が作成されてSharePointに保存されます。
投稿を読む →

この操作を実行する前に: 著者 Excel スマートマーカーフィールドを含むテンプレート &=Items.ItemName完全な文法(修飾語、複数シートレイアウト、ネストされた JSON パス、数式処理、カルチャ書式設定)に加えてダウンロード可能なサンプルテンプレートと JSON ペイロードは Excel テンプレート構文の入力 参考ページ。

認証 API リクエスト​

の PDF4me コネクタを接続します Power Automate 有効な 繋がり あなたの PDF4me API キー。フロー設計時に一度接続を作成し、その後は PDF4me テナント内のアクションがそれを再利用します。

見逃してはならない重要な事実​

JSON データキーはマーカーデータソース名と一致する必要があります
マーカー &=Items.ItemName 必要とする JSON 含む 商品 オブジェクトの配列 商品名 プロパティ。フィールド名は大文字と小文字を区別します(アイテム名 一致しません 商品名)
ワークシートのインデックスは1から始まり、カンマで区切られています。
すべてのシートにデータを入力するには、ワークシートインデックスを空欄のままにしてください。 2 2枚目のシートのみに入力するか、 1,3 最初のシートと3番目のシートにデータを入力します。複数のシートで構成されるテンプレートで、上位システムがワークブックの一部のみを所有している場合に便利です。
数式はデフォルトで再計算されます
計算式はデフォルトで はい 受信者がファイルを開いた瞬間に合計、SUM、および依存セルが正確になります。 いいえ 下流工程で再計算して時間を節約したい場合。
Power Automate の Excel - データの入力アクション。ファイルコンテンツは、SharePoint の「ファイルコンテンツの取得」ステップからマッピングされます。JSON データには、Items 配列があり、それぞれに ItemName、Qty、UnitPrice を含む 3 つのレコード (A123、B456、C789) が表示されます。ファイル名は Populate.xlsx です。ワークシートインデックスは 2 です。

の Excel - 設定されたアクションを読み込む Power Automate ファイルがマッピングされたフロー SharePointインライン JSON アイテム配列とワークシートインデックスを使用して、マージをシート2に制限します。

パラメータ​

必須: ファイルの内容、 JSON データ。 推奨: ファイル名(デフォルトは Populate.xlsxテンプレートに複数のシートがある場合は、ワークシートインデックスも使用します。 高度な: 厳しい JSON 文字列、文化と言語の設定、計算式、引用符のスタイル設定。

パラメータ必須その機能例
File ContentRequiredContent of the Excel template that contains the Smart Markers. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
File NameOptionalName of the Excel template, including its extension (for example `template.xlsx`). Map it from the file name returned by a previous action. Defaults to `Populate.xlsx`.template.xlsx
JSON DataRequiredData to fill into the template, as JSON text. Smart Markers in the template (for example `&=Items.ItemName`) refer to its properties. Defaults to `{}`.&=Items.ItemName
Strict JSON StringsOptionalIf Yes (the default), JSON string values are kept as text. Set to No to convert quoted values before they are filled in. Defaults to `Yes`.Yes
Culture & Language SettingsOptionalCulture name for formatting (e.g., en-US, fr-FR, de-DE). Defaults to `en-US`.en-US
Calculate FormulasOptionalRecalculate workbook formulas after population. Defaults to `Yes`.Yes
Worksheet IndexesOptionalComma-separated worksheet indexes (1-based) to populate. Leave empty for all. ( 1,2,3).your value
Quote Prefix To StyleOptionalApply quote-prefix behavior to style values when present.No
Excel のデータ入力アクションの詳細パラメーターパネル: 厳密な JSON 文字列 はい、カルチャと言語設定 en-US、計算式 はい、引用符の接頭辞スタイル はい

詳細パラメーターパネル Excel - Populate は Strict を公開します JSON 文字列、文化と言語の設定、計算式、引用符のスタイル設定。

出力​

動的コンテンツフィールドタイプ内容物
Output File ContentFile contentContent of the populated Excel file. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file.
Output File NameTextFile name of the populated Excel file, as returned by PDF4me. Use it as the file name when saving the file.
SuccessYes/NoWhether the operation completed successfully
Error MessageTextError message if operation failed
Error DetailsArrayList of detailed error messages
Excel - 出力ファイルの内容、出力ファイル名、成功、エラーメッセージ、エラーの詳細項目を表示する動的コンテンツピッカーを作成する

Excelから動的コンテンツを出力 - 入力アクション、下流工程へのマッピング準備完了 Microsoft 365 行動。

生の応答形状​

参考のために (または基となるものを呼び出すとき) REST エンドポイントに直接アクセスする場合、成功したときのアクションボディは次のようになります。

Excel - 入力アクションからの生のHTTPレスポンス。ステータスコードは200、Content-Typeはapplication/jsonです。本文には、Base64エンコードされたXLSXファイル(ファイル名:Populate.xlsx)と成功を示す値(true)を含むdocumentフィールドが含まれています。

ステータスコード200、コンテンツタイプ アプリケーション/json体が運ぶ 書類 (Base64 XLSX) ファイル名、 そして 成功。 エラーメッセージ そして エラー 配列は、実行が失敗した場合にのみ存在します。

簡単なサンプル(3分でお試しください)​

すぐに実行できる組み合わせが 2 つあり、上記のスクリーンショットと一致します。各ペアをダウンロードし、XLSX をファイル コンテンツにドロップし、 JSON の中へ JSON データを取得して、実行する。

コンボA:シンプルなアイテム(パラメータのスクリーンショットと一致します)

用途 テンプレート.xlsx と ワークシート索引 = 2 (シート2には、パラメーターのスクリーンショットで使用されているシンプルなアイテムマーカーが含まれています。)対応するフラットアイテムとペアにしてください。 JSON。

コンボB:リッチな請求書 Excel テーブル

請求書シートを使用します テンプレート.xlsx ネストされた &=RootData.Items.* マーカー、構造化参照式 シンプルインボイス 表、小計 + 税金 + 合計の計算。

コンボC:複数シートのワークブック

各シートに異なるデータソースを示す3シートのテンプレート。ファイル内のシートの順序は次のとおりです。 アイテム、従業員、製品。

フローの例​

Power Automateの一般的なワークフローパターンTypical ways to chain Excel - Populate into a flow.
SharePointリストから請求書を作成するワークブック
  1. SharePoint アイテムが作成されると、注文リスト上でトリガーが作動します。
  2. SharePoint 「アイテムの取得」は、注文明細リストから一致する明細項目を取得します。
  3. Compose は、 JSON 明細項目からのItems配列を含むデータペイロード。
  4. SharePoint ファイルコンテンツを取得すると、請求書が読み込まれます。 Excel テンプレート。
  5. Excel - マージテンプレートにデータを投入する JSON。
  6. Outlook メール送信時に、出力ファイルの内容を顧客に添付します。
定期月次在庫報告書
  1. 繰り返しトリガーは、毎月1日の午前9時に作動します。
  2. Dataverseリストの行は、現在の在庫状況を取得します。
  3. Compose は結果を形作ります JSON Products配列を持つオブジェクト。
  4. SharePoint ファイルコンテンツを取得すると、3枚のシートからなるテンプレートが読み込まれます。
  5. Excel - ワークシートインデックスを2に設定した実行データを入力します(製品シートのみ)。
  6. OneDrive レポートのファイルアーカイブを作成すると、Teams からそのファイルアーカイブへのリンクを含むメッセージが投稿されます。
スタッフ名簿への回答フォーム
  1. Microsoft Forms では、新しい回答が送信されるとトリガーが作動します。
  2. Dataverseリストの行は、関連する従業員と部署を取得します。
  3. Compose は、 JSON 従業員配列を含むデータ。
  4. Excel - PopulateはHR名簿テンプレートにマージされ、文化はフォームの応答に基づいてロケールに設定されます。
  5. Outlook メール送信機能を使うと、入力済みのワークブックが人事部長に送信されます。

よくある質問​

What is the JSON Data field expected to contain?+
A JSON object whose top-level keys match the data source names used in the Smart Markers of your Excel template. For markers like &=Items.ItemName, the JSON must contain an Items array of objects with an ItemName field. Field names are case sensitive.
What syntax do the cells in the Excel template use?+
Aspose Smart Markers. Cells use &=DataSource.FieldName as the marker. Optional modifiers in parentheses control layout: (dynamic), (horizontal), (noadd), (skip:N), (copystyle), (shift), (repeat). See the Excel Populate Template Syntax page for the full grammar with examples.
What does Worksheet Indexes do?+
Restricts the merge to specific sheets. The value is comma-separated 1-based sheet indexes (for example 1,3 to populate the first and third sheet). Leave it empty to populate every sheet in the workbook.
Does Excel Populate recalculate formulas?+
Yes by default. Calculate Formulas is Yes by default so the workbook arrives with totals and aggregates already accurate. Set it to No when you intend to recalculate later in your own pipeline and want to skip the cost.
What does Strict JSON Strings do?+
Yes (default) preserves quoted JSON string primitives as text in the Excel cell. Set No to coerce quoted numeric-looking strings into typed numeric values during the merge. Use the default unless you have a specific reason to convert string primitives.
My template has a sheet I do not want populated. How do I exclude it?+
Use Worksheet Indexes. If your workbook has sheets in order Cover, Data, Notes (indexes 1, 2, 3) and you only want Data populated, pass 2. Cover and Notes stay untouched.
How big can the JSON payload be?+
Practical limits are bounded by the Power Automate action body size cap plus Excel cell limits. For larger payloads, write the JSON to a SharePoint or OneDrive file and reference it via a custom dispatcher pattern, or split the work into one call per sheet using Worksheet Indexes.
Does this work in Power Automate Desktop?+
PDF4me Connect is a cloud connector available in Power Automate (the web flow designer). For Power Automate Desktop, call the Excel Populate REST endpoint with the HTTP action.

関連アクション​

ヘルプが必要な場合​