ライブスプレッドシートで使える WooCommerce order lines
Order lines テーブルを order_lines という名前のデータソースとしてシートに追加すると、その22個の列が、関数、ピボットテーブル、グラフで使える名前になります。Sheets は、シートを開くたび、または更新するたびに WooCommerce ストア から読み取ります。
このテーブルで使える関数
=data.order_lines.sum(quantity) Quantityの合計. Order linesのすべての行について、Quantity列を合計します。
=data.order_lines.sum(quantity, status, A2) Statusごとのquantity. A2 にstatusを入力すると、その1件の合計になります。一覧の隣で下にコピーしてください。
=list.order_lines(status) すべてのstatus(重複なし). statusの重複しない値を列方向に展開します。上の関数の行ラベルになります。
=data.order_lines.sum(quantity, date, ">=2026-01-01") ある日付以降. Dateが2026年1月1日以降の行のみ対象です。">="、"<"、"<>" などの条件は、一般的なスプレッドシートと同じように使えます。
=data.order_lines.count(date, status, "<>") Statusがある行. Statusが空でない行を数えます。
=data.order_lines.avg(price) Priceの平均. avg、min、max、count、countd(重複なし)、first も sum と同じ方法で使えます。
このテーブルを使うレポート
=data.order_lines.sum(quantity, product, A2, counts_as_sale, TRUE) 商品別の販売数. 注文明細から商品ごとの数量を集計。商品は =list.order_lines(product) で並べます。
列
| 列 | 関数での名前 | 型 |
|---|---|---|
| Date | date | 日付 |
| Month | month | テキスト |
| Order number | order_number | テキスト |
| Status | status | テキスト |
| Counts as sale | counts_as_sale | はい / いいえ |
| Product | product | テキスト |
| Variation | variation | テキスト |
| SKU | sku | テキスト |
| Category | category | テキスト |
| Quantity | quantity | 整数 |
| Price | price | 数値 |
| Subtotal | subtotal | 数値 |
| Discount | discount | 数値 |
| Total | total | 数値 |
| Tax | tax | 数値 |
| Currency | currency | テキスト |
| Customer | customer | テキスト |
| Country | country | テキスト |
| Product ID | product_id | テキスト |
| Variation ID | variation_id | テキスト |
| Order ID | order_id | テキスト |
| ID | id | テキスト |
salesのほかのテーブル
order linesを、リアルタイムで
注文、返金、商品、顧客、クーポンが WordPress 管理画面の中でライブ テーブルになります。CSV を書き出さなくても、売上レポートとダッシュボードは常に最新です。