# 匯出場資料 CSV (`field.exportCsv`)

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/commands/field-exportCsv/)

**選單:** 無（快速開啟、CLI、Python 與 MCP） · **執行方式:** 立即完成

> 預覽功能：在「編輯 › 偏好設定 › 模擬」開啟預覽功能，或執行 `preview.set {"enabled":true}`。回覆會帶有 `preview: true` 與說明。

以下參數與說明取自指令本身的定義，與 CLI、Python 及 MCP 讀到的文字相同，因此保留英文。

## 說明

Preview. Writes a field result as RFC 4180 CSV that spreadsheets, pandas, MATLAB and R read as it is: one header line naming each column with its SI unit (x\_m, b\_T, h\_A\_per\_m, loss\_W\_per\_m3, temperature\_C), the same number of fields on every line, text quoted when it holds a comma or a quote, numbers in their shortest round-trip form, an empty field where a value does not exist. Changes nothing.

## 參數

- `result`: object? (a reply of magnetics.fieldSolve, field.openExample, magnetics.fieldCoreLoss or field.thermalSolve with field:true, field.lineProfile, field.regionTable, or field.thermalSolve with line; default the latest result of this session that has the table)
- `table`: "elements|profile|regions|line"? (elements: one line per mesh element with its region, centroid, area, then per winding bx, by, |B| and |H| at 1 A, and the loss density or the temperature when the result has them; profile: field.lineProfile's points; regions: field.regionTable's rows; line: the temperature along field.thermalSolve's line; default the result's own)
- `path`: str? (the .csv file to write, through the host's file service)

## 回覆

- table
- columns
- rows
- bytes
- csv? (without path)
- path
- written
- source:{command,kind}
- notes
- preview
- previewNote
