
ERP and bank exports often arrive as messy text. Notepad++ (free) fixes them in seconds.
In this article
- Column mode: hold Alt and drag to select a vertical block β delete a column of junk or type the same text on 500 lines at once.
- Remove blank lines: Edit β Line Operations β Remove Empty Lines.
- Remove duplicates: Edit β Line Operations β Remove Duplicate Lines.
- Sort lines: Edit β Line Operations β Sort Lines Lexicographically.
- Change encoding: Encoding β Convert to UTF-8 fixes βΓ’β¬β’β garbage characters before importing.
Regex find and replace
Ctrl+H, set Search Mode to Regular expression:
| Find | Replace | Does |
|---|---|---|
\s+$ |
(empty) | Trailing spaces |
^(\d{2})/(\d{2})/(\d{4}) |
\3-\2-\1 |
dd/mm/yyyy β yyyy-mm-dd |
,{2,} |
, |
Collapse repeated commas |
New to regex? Read regex basics for office users.
A real clean-up, start to finish
Here is a typical bank export pasted into Notepad++, and the exact steps that turn it into something Excel will read without complaint.
- Check the encoding first. If you see
Γ’βΒΉinstead of βΉ, go to Encoding β Convert to UTF-8. Doing this later means re-fixing everything. - Remove blank lines: Edit β Line Operations β Remove Empty Lines (Containing Blank characters).
- Delete the report header with column mode: Alt+drag over the junk columns and press Delete.
- Standardise dates with regex replace (Ctrl+H, Regular expression): find
(\d{2})/(\d{2})/(\d{4}), replace with\3-\2-\1. Excel reads yyyy-mm-dd correctly regardless of regional settings. - Remove thousand separators inside numbers: find
(\d),(\d{3}), replace\1\2(run it twice for lakhs). - Turn multiple spaces into a tab so columns split cleanly: find
{2,}, replace\t. Paste into Excel and each field lands in its own column.
Features people miss
- Multi-cursor typing: Ctrl+click in several places and type once.
- Compare two files: install the Compare plugin (Plugins β Plugins Admin) to see what changed between two exports.
- Record a macro for a clean-up you repeat monthly: Macro β Start Recording, do the steps, stop, save it with a shortcut.
- Find in Files (Ctrl+Shift+F) searches every file in a folder β perfect for βwhich of these 40 CSVs has invoice 1042?β.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βStuck on a step? Ask a question and the AI answers using this article.