---
title: PowerShellでExcelのデータ接続を更新し、JSON出力する
url: 'https://automationse.net/powershell-excel-json-refresh'
markdown: 'https://automationse.net/powershell-excel-json-refresh.md'
date: '2025-10-15'
description: 'Excelには外部データ接続（Power Queryなど）を使って最新データを取り込む機能があります。 この記事では PowerShell 5.x を使って、次の処理を自動化します👇 Excelのデータ接続をすべて更新 「日付」と「ステータス」で複合フィルタ フィルタ後のデータを JSON 出力（非連続セルにも対応） 💻 スクリプト…'
taxonomy:
  category:
    - IT関連
  tag:
    - Excel
    - PowerShell
---

# PowerShellでExcelのデータ接続を更新し、JSON出力する

## [PowerShellでExcelのデータ接続を更新し、JSON出力する](https://automationse.net/powershell-excel-json-refresh)

  公開日 2025.10.15 更新日 2025.10.15  [Excel](https://automationse.net/tag:Excel#body-wrapper) [PowerShell](https://automationse.net/tag:PowerShell#body-wrapper)  

 Excelには外部データ接続（Power Queryなど）を使って最新データを取り込む機能があります。 この記事では **PowerShell 5.x** を使って、次の処理を自動化します👇

- Excelのデータ接続をすべて更新
- 「日付」と「ステータス」で複合フィルタ
- フィルタ後のデータを JSON 出力（非連続セルにも対応）

### 💻 スクリプト全文

### ⚙️ 実行例

### 🧠 ポイント

| 機能 | 説明 |
|---|---|
| Excel更新 | Workbook.RefreshAll() で最新データを取得 |
| 複合フィルタ | Date＋Status の2条件をExcel内部でAND処理 |
| 高速化 | 可視セルだけを .Value2 で転送 |
| 安定性 | 非連続領域(Areas)にも対応 |
| 出力形式 | JSON (UTF-8) で保存 |

 [ Previous Post](https://automationse.net/powershell-json-piechart-wpf) [Next Post ](https://automationse.net/pr_recoveryfox-ai_possibility)

---

## Navigation

- Parent: [WordPress Import](https://automationse.net/wordpress-import.md)
- Previous: [【PR】RecoveryFox AIというデータ復元ソフトの可能性](https://automationse.net/pr_recoveryfox-ai_possibility.md)
- Next: [PowerShell + XAML + WPFで作る「JSONデータ件数の円グラフ表示ツール」](https://automationse.net/powershell-json-piechart-wpf.md)
