Office 文件
19 個節點
本頁內容 19
新增段落
函數在 Impulse 文件末尾新增一個段落。
簽名
新增段落
Document Session: Document Session
文字: 文字
樣式: 文字void AddParagraph(
DocumentSession Document Session,
string text,
string style = "")參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 文字 | 文字 | — | 段落的文字。 |
| 樣式 | 文字 | — | 段落樣式的名稱;留空則為正文樣式。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
新增工作表
函數向 Formula 活頁簿新增一個工作表。
簽名
新增工作表(Document Session: Document Session, 名稱: 文字)
void AddSheet(DocumentSession Document Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 工作表的名稱。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
新增投影片
函數在 Expo 簡報末尾新增一張帶標題和正文的投影片。
簽名
新增投影片 -> 數字
Document Session: Document Session
標題: 文字
正文: 文字double AddSlide(
DocumentSession Document Session,
string title,
string body = "")參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 標題 | 文字 | — | 標題。 |
| 正文 | 文字 | — | 正文;可留空。 |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
真否參數
函數文件的某個參數,作為真或假。
簽名
真否參數(Document Session: Document Session, 名稱: 文字) -> 真否
bool BooleanParameter(
DocumentSession Document Session,
string name)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
文件名稱
函數文件的名稱:命令所處理的文件,或“開啟 Office 文件”開啟的文件。
簽名
文件名稱(Document Session: Document Session) -> 文字
string DocumentName(DocumentSession Document Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
文件路徑
函數文件的檔案;從未儲存過的文件則沒有:命令所處理的文件,或“開啟 Office 文件”開啟的文件。
簽名
文件路徑(Document Session: Document Session) -> 文字
string DocumentPath(DocumentSession Document Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
讀取儲存格
函數Formula 活頁簿中一個儲存格的值。
簽名
讀取儲存格 -> 任意
Document Session: Document Session
地址: 文字object GetCell(DocumentSession Document Session, string address)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 地址 | 文字 | — | 儲存格,例如 B2 或 Summary!B2。 |
返回
| 結果 | 任意 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
有參數
函數文件是否有某個名稱的參數。
簽名
有參數(Document Session: Document Session, 名稱: 文字) -> 真否
bool HasParameter(DocumentSession Document Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
數字參數
函數文件的某個參數,作為數字。
簽名
數字參數(Document Session: Document Session, 名稱: 文字) -> 數字
double NumberParameter(
DocumentSession Document Session,
string name)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
參數
函數文件的某個參數的值,保持其原有型別:數字、一段文字或真/假。
簽名
參數(Document Session: Document Session, 名稱: 文字) -> 任意
object Parameter(DocumentSession Document Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
返回
| 結果 | 任意 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
參數名稱
函數文件各參數的名稱,按文件儲存它們的順序排列。
簽名
參數名稱(Document Session: Document Session) -> 文字陣列
string[] ParameterNames(DocumentSession Document Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — |
返回
| 結果 | 文字陣列 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
執行命令
函數在本次執行的事務中執行文件的某個命令——文件所攜帶的 Lua、C# 或圖指令碼:事件處理程式把工作交給命令的方式。命令失敗則本次執行失敗,整個步驟都會撤回。
簽名
執行命令(Document Session: Document Session, 名稱: 文字)
void RunCommand(DocumentSession Document Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 指令碼的名稱,例如 Refresh.lua;沒有其他指令碼同名時也可省去副檔名。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
儲存
函數儲存“開啟 Office 文件”開啟的文件及其參數;視窗借出的文件由視窗儲存。
簽名
儲存(Document Session: Document Session)
void Save(DocumentSession Document Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
設定儲存格
函數設定 Formula 活頁簿中一個儲存格的值;以 = 開頭的文字仍是文字。
簽名
設定儲存格
Document Session: Document Session
地址: 文字
值: 任意void SetCell(
DocumentSession Document Session,
string address,
object value)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 地址 | 文字 | — | 儲存格,例如 B2 或 Summary!B2。 |
| 值 | 任意 | — | 值。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
設定公式
函數在 Formula 活頁簿的儲存格中寫入公式。
簽名
設定公式
Document Session: Document Session
地址: 文字
公式: 文字void SetFormula(
DocumentSession Document Session,
string address,
string formula)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 地址 | 文字 | — | 儲存格。 |
| 公式 | 文字 | — | 公式,例如 =SUM(A1:A9)。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
設定參數
函數設定文件的某個參數,並轉換為其型別:僅限命令或事件處理程式。
簽名
設定參數
Document Session: Document Session
名稱: 文字
值: 任意void SetParameter(
DocumentSession Document Session,
string name,
object value)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
| 值 | 任意 | — | 新的值。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
投影片數量
函數Expo 簡報有多少張投影片。
簽名
投影片數量(Document Session: Document Session) -> 數字
double SlideCount(DocumentSession Document Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
文字參數
函數文件的某個參數,作為文字。
簽名
文字參數(Document Session: Document Session, 名稱: 文字) -> 文字
string TextParameter(
DocumentSession Document Session,
string name)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 名稱 | 文字 | — | 參數的名稱。 |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office
寫入表格
函數把表格寫入 Formula 活頁簿,其左上角位於某個儲存格。
簽名
寫入表格
Document Session: Document Session
地址: 文字
表格: Object[,]void WriteTable(
DocumentSession Document Session,
string address,
object[,] table)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Document Session | Document Session | — | |
| 地址 | 文字 | — | 左上角的儲存格。 |
| 表格 | Object[,] | — | 表格。 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- Office 文件
- 所屬包
- Methodox Office