name: excel-overflow-fix description: Fix Excel cell overflow/truncation issues by auto-detecting cells with content exceeding cell boundaries and applying wrap text + row height adjustments. Only modifies the "審定表" sheet (audit confirmation sheet), leaving all other sheets untouched. Use when processing financial audit working papers (.xlsx/.xls) where cell content is cut off or not fully visible when printing. Triggered by requests involving cell overflow, truncated text, row height adjustment, print formatting, or audit working paper formatting. slug: excel-overflow-fix101
This skill fixes cell overflow/truncation issues in Excel audit working papers. It automatically detects cells where content exceeds the visible area (including merged cells), applies text wrapping, and adjusts row heights so all content is fully visible and printable.
Key guarantees: - Only modifies the sheet named "審定表" (audit confirmation sheet) - Never changes cell content, formulas, or data - Only adjusts formatting (wrap text + row height) - All other sheets remain completely untouched
Identify the folder containing the Excel files to process. The skill handles both .xlsx and .xls files.
Execute the bundled Python script:
python scripts/fix_overflow.py <input_folder> [output_folder]7w4.net收錄了海量優質技能外掛。
Parameters:
- input_folder (required): Path to folder containing Excel files
- output_folder (optional): Where to save fixed files. Defaults to <input_folder>/fixed
Example:
python scripts/fix_overflow.py "C:\Users\Dell\Desktop\底稿"
Fixed files are saved with _fixed suffix in the output folder. Each file's "審定表" sheet will have:
- Overflow cells wrapped properly
- Row heights adjusted to fit content
- All other sheets identical to original
wrapText=True and calculates required row heightOverflow detection logic:
- Skips metadata markers (---, calction)
- Skips pure numbers and reference codes
- Ignores text shorter than 8 characters
- Calculates needed lines based on column width and font size
- Handles merged cells by distributing height across merged rows
pip install openpyxl)fix_overflow.py - Main script for batch processing Excel files.xlsx and .xls files in the input folder這個 Skill 質量不錯,專門用來解決 Excel 表格列印時文字被截斷的問題。它的優點是隻修改需要修復的單元格,不會亂改其他內容,而且能自動跳過短文本和數字避免誤報。程式碼邏輯清晰,文件說明也很詳細。不過閾值引數目前是寫死的,如果使用者想自定義調整就沒那麼方便了。總體來說是一個可靠實用的格式化工具。