Power QueryExcel

用 Power Query 步驟合併並清理每月檔案

通常 15 分鐘內完成含修改次數品質檢查
方案
付款保障詳細資訊
  • 方案內的修改免費。
  • 若您在交付後 3 天內未回應,成果將自動驗收。

付款時款項會先保留,在您驗收後才會撥付。

用 Power Query 步驟合併並清理每月檔案

成果範例

標準版方案範例

Spreadsheet template: invoice tracker for a small agency

Sheet layout — tab "Invoices"

ColumnHeaderFilled by
AInvoice #You
BClientYou (drop-down from tab "Clients")
CIssue dateYou
DAmountYou
EPayment terms (days)Formula
FDue dateFormula
GPaid onYou (leave empty until paid)
HStatusFormula
IDays overdueFormula

Formulas (excerpt, 6 of 10)

E2 — payment terms from the client list =IFERROR(VLOOKUP(B2, Clients!A:C, 3, FALSE), 30) Looks up the client's terms in the "Clients" tab; if the client isn't there, uses 30 days.

F2 — due date =IF(C2="", "", C2 + E2) Adds the terms to the issue date. Stays empty for blank rows.

H2 — status =IF(C2="", "", IF(G2<>"", "Paid", IF(TODAY()>F2, "Overdue", "Open"))) Paid if a payment date is entered; otherwise Overdue after the due date, else Open.

I2 — days overdue =IF(H2="Overdue", TODAY() - F2, "")

Dashboard!B2 — total outstanding =SUMIFS(Invoices!D:D, Invoices!H:H, "<>Paid", Invoices!C:C, "<>")

Dashboard!A5 — balance by client (one formula fills the table) =QUERY(Invoices!B:H, "select B, sum(D) where H <> 'Paid' and B is not null group by B order by sum(D) desc label sum(D) 'Owed'", 1)

Where to paste

  • Put E2, F2, H2 and I2 in row 2 of "Invoices", then drag down to row 500
  • Paste the two Dashboard formulas once; they update by themselves
  • Conditional formatting on H2:H500: text is "Overdue" → light red fill

Edge cases handled

  • Partly paid invoice: add a row with the remaining amount and a new number like INV-041b
  • Client renamed: change it only in "Clients"; the drop-down keeps rows consistent
  • Excel instead of Sheets: all formulas work except QUERY; use a PivotTable on columns B, D, H instead

Check example

Invoice INV-038, client Northside Dental, issued Sep 1, terms 14 days → due Sep 15. Today Oct 20, not paid → Overdue, 35 days.

Client: a 4-person video production studio. Tool: Google Sheets. Task: "We lose track of who has paid. We need one sheet that shows overdue invoices and how much each client owes."

客戶與所有細節皆為虛構。

關於此服務

如果您每個月都要把幾份匯出檔複製到同一張工作表、刪除標題列、修正日期並移除空白,Power Query 可以在重新整理時自動完成。請附上每月批次中的一兩個範例檔案,我們會撰寫 Power Query 步驟與 M 程式碼,用來合併資料夾中的檔案、清理欄位、設定資料類型,並將它們附加或合併成一份表格。下個月只要把新檔案放進資料夾,按下重新整理即可。

包含內容

  • 您會收到依序排列的 Power Query 步驟及每個查詢的 M 程式碼,可直接貼入進階編輯器,另附資料夾設定與重新整理的說明。所有內容皆以文字呈現在訂單頁面;我們不會提供現成的試算表檔案。
  • 從資料夾合併所有月份檔案整合在一個查詢中
  • 清理步驟標題、空白、修剪、分割
  • 資料類型正確設定日期與數字
  • M 程式碼可直接用於進階編輯器
  • 合併與附加標準版起:結合多個來源

服務流程

  1. 1
    上傳您附上範例檔案
  2. 2
    查詢我們撰寫步驟與 M 程式碼
  3. 3
    修正若在您的資料上出現問題,我們會在方案範圍內修正

需要您提供的資料

一兩個每月範例檔案(Excel 附件或截圖)、最終表格應有的樣子,以及您的 Excel 版本。

我們會詢問您:

  • 每月檔案來自哪裡?
  • 共有幾種不同的檔案版面?
  • 最終表格應包含什麼?
  • 您使用哪個 Excel 版本?

比較方案

方案基本版單一查詢US$12標準版每月處理流程US$25進階版完整報表準備US$49
交付期限1 天2 天3 天
修改次數123
查詢數1最多 3 個最多 6 個
M 程式碼有有有
合併多個來源無有有
訂購 基本版訂購 標準版訂購 進階版

付款保障

下單時付款,但只有在驗收成果後,款項才會撥付。

  • 固定價格付款後,方案價格不會變動。
  • 款項先行保留付款時,金額只會先保留,在您驗收後才會撥付給服務。
  • 交付前檢查每份成果在交到您手上之前都會經過品質檢查,您也可以在驗收前於訂單頁面查看成果。
  • 免費修改在需求說明範圍內,可依方案允許的次數提出修改。
  • 3 天後自動驗收若您在交付後 3 天內未驗收也未提出修改,成果將自動驗收。若您在交付後於訂單聊天室留言,訂單會暫停自動驗收;我們回覆後,可能會重新起算 3 天,並會在聊天室中告知。
  • 重新製作或全額退款若成果不符合您的需求說明且修改後仍未改善,或製作時間超過交付期限的兩倍,請在訂單聊天室留言:我們將重新製作,或全額退還款項。
運作方式 →

常見問題

可以在 Google 試算表中使用嗎?

不行,Power Query 是 Windows 版 Excel 的一部分,Mac 版 Excel 則有部分限制。如果要用於 Google 試算表,請選擇我們的 Apps Script 服務。

如果下個月匯出格式改變了怎麼辦?

欄位被改名或移動會使步驟失效。我們會指出哪些步驟依賴欄位名稱,讓您知道該檢查哪裡。

檔案可以是 CSV 而不是 Excel 嗎?

可以,Power Query 也能讀取 CSV。請將 CSV 的幾行貼在需求說明中,讓我們看到分隔符號與編碼。

沒有找到您要的答案?

方案