
成果範例
Merging the monthly sales files of 9 shops into one Excel report
How it is run
python merge_sales.py --month 2026-10
2026-11-02 09:14:03 INFO Folder: sales/2026-10, 9 files found
2026-11-02 09:14:03 INFO shop-01.csv: 1,284 rows
2026-11-02 09:14:04 INFO shop-02.xlsx: 967 rows
2026-11-02 09:14:04 WARN shop-07.csv: 3 rows without a price skipped (lines 88, 412, 913)
2026-11-02 09:14:05 INFO Done: 10,412 rows -> report-2026-10.xlsx (sheets "Sales" and "Totals")
Settings, not code
The column names of each shop live in settings.ini, so a new shop or a renamed column is a line there:
[columns]
date = Date, Sale date, Day
product = Product, Item, Name
quantity = Qty, Quantity, Pcs
price = Price, Unit price
A part of the code
def read_shop_file(path: Path, columns: dict[str, list[str]]) -> pd.DataFrame:
"""Reads one shop's file and gives it the report's column names."""
table = pd.read_excel(path) if path.suffix == ".xlsx" else pd.read_csv(path, encoding="utf-8-sig")
renamed = {}
for name, variants in columns.items():
found = next((c for c in table.columns if c.strip() in variants), None)
if found is None:
raise ReportError(f"{path.name}: no column for '{name}' (looked for {', '.join(variants)})")
renamed[found] = name
table = table.rename(columns=renamed)[list(columns)]
table["shop"] = path.stem
return table
Files: a ZIP archive with merge_sales.py (310 lines), settings.ini, requirements.txt and a README with installing Python, running the script and what each message in the log means. The client runs it on their own computer.
Client: a small chain of 9 stationery shops; each shop sends its sales for the month as a CSV or Excel file, with slightly different column names. Task: one script that reads every file in a folder, brings the columns to one shape, and writes a single Excel report with all sales and a sheet of totals by shop.
客戶與所有細節皆為虛構。
關於此服務
Google 表單可以通知您有新回覆,但不會告訴您內容是什麼,也不會通知負責該城市或服務的同事。這個 Google Apps Script 會在每次有人提交表單時執行,寄出一封把回覆整理清楚的郵件:問題用粗體、答案列在下方,並附上回覆試算表的連結。標準版起,它能依某個答案決定寄給誰,例如倫敦的申請寄到一個地址、巴黎的寄到另一個。進階版還能寄確認信給填表人(如果表單有詢問其電子郵件),並每天寄一份摘要給您。郵件從您自己的 Google 帳戶寄出,受 Google 設定的每日上限限制。腳本由您在自己的帳戶中安裝。
包含內容
- 您會得到一個 ZIP 壓縮檔,內含 Apps Script 程式碼和 README,說明如何加到您的表單、授權存取並設定觸發條件;訂單頁面上也會顯示程式碼。
- 完整的回覆每個問題和答案都直接寫在郵件中
- 清楚的主旨例如:新申請:姓名、服務
- 寄給對的人標準版起,依某個答案選擇收件地址
- 從您的帳戶寄出從您的 Google 帳戶寄出,符合 Google 的限制
- 易讀的程式碼附有註解,日後很容易修改郵件
服務流程
- 1任務您提供表單的問題,以及什麼該寄給誰
- 2程式碼我們撰寫腳本和安裝說明
- 3試跑您加到表單的副本中,並提交一筆測試回覆
- 4修改您在方案範圍內提出修改,並附上任何錯誤訊息
需要您提供的資料
您表單的問題(截圖或清單)、應收到通知的地址;標準版起,請提供誰收到什麼的規則,例如依城市或服務。郵件的主旨和您想放的任何文字。如果要寄確認信給填表人(進階版),請提供那封郵件的內文,以及詢問其電子郵件地址的問題。您的表單是否把回覆存到 Google 試算表。
我們會詢問您:
- 這份表單的用途是什麼?
- 誰應該收到通知?
- 郵件要長什麼樣子?
- 還要寄送其他東西嗎?
比較方案
付款保障
下單時付款,但只有在驗收成果後,款項才會撥付。
- 固定價格付款後,方案價格不會變動。
- 款項先行保留付款時,金額只會先保留,在您驗收後才會撥付給服務。
- 交付前檢查每份成果在交到您手上之前都會經過品質檢查,您也可以在驗收前於訂單頁面查看成果。
- 免費修改在需求說明範圍內,可依方案允許的次數提出修改。
- 3 天後自動驗收若您在交付後 3 天內未驗收也未提出修改,成果將自動驗收。若您在交付後於訂單聊天室留言,訂單會暫停自動驗收;我們回覆後,可能會重新起算 3 天,並會在聊天室中告知。
- 重新製作或全額退款若成果不符合您的需求說明且修改後仍未改善,或製作時間超過交付期限的兩倍,請在訂單聊天室留言:我們將重新製作,或全額退還款項。
常見問題
可以寄確認信給填表人嗎?
進階版可以,只要您的表單有詢問其電子郵件地址。郵件從您的 Google 帳戶寄出,所以看起來就像您寄出的任何郵件。
如果表單在別人的帳戶中,也能用嗎?
腳本必須由表單的編輯者加入,郵件也會從那個人的帳戶寄出。README 會說明步驟。
可以改成傳簡訊或聊天訊息嗎?
這項服務寄送的是郵件。如果您自己設定好傳入 Webhook,可以在方案範圍內加入傳訊息到有公開 API 的服務,例如 Slack 頻道。
你們會取得我表單的存取權嗎?
不會。程式碼由您自己加入,並在您自己的帳戶中授權存取。我們只需要問題的截圖。
沒有找到您要的答案?