ExcelPipe CLI Reference | DataMystic
ExcelPipe Command-Line Reference
Automate batch find and replace operations across Microsoft Excel spreadsheets using ExcelPipe's command-line interface. Update data sources, replace images, and process thousands of .xls and .xlsx files in a single operation.
Command Syntax
ExcelPipe.exe [input options] [find/replace options] [data source options] [image options] [output options] [advanced options]
All parameters use the /parameter:value format. String values containing spaces
must be enclosed in double quotes. Parameters are case-insensitive.
Input File Parameters
| Parameter | Description | Example |
|---|---|---|
/input:<path> |
Input file or folder path. Specify a single file or a folder to process all matching files. | /input:"C:\Spreadsheets\budget.xlsx" |
/inputmask:<mask> |
File mask filter when input is a folder. Supports wildcards. Default: *.xls;*.xlsx |
/inputmask:"*.xlsx;*.xlsm" |
/subfolders |
Include subfolders recursively when input is a folder. | /subfolders |
/inputlist:<file> |
Path to a text file containing one input file path per line. | /inputlist:"C:\filelist.txt" |
Find and Replace Parameters
| Parameter | Description | Example |
|---|---|---|
/find:<text> |
Text string to search for in cell values, formulas, and text. Required for find-and-replace operations. | /find:"Q3 2024" |
/replace:<text> |
Replacement text. Use empty string for deletion: /replace:"" |
/replace:"Q4 2024" |
/casesensitive |
Enable case-sensitive matching. Default: case-insensitive. | /casesensitive |
/wholeword |
Match whole words only. | /wholeword |
/findlist:<file> |
Path to a tab-delimited file with find/replace pairs (one pair per line). | /findlist:"C:\replacements.txt" |
/scope:<area> |
Limit search scope. Values: all, values, formulas, comments, headers, sheetnames. Default: all |
/scope:values |
/sheets:<names> |
Limit processing to specific sheet names (semicolon-separated). Default: all sheets. | /sheets:"Sheet1;Summary" |
/hyperlinks |
Also find and replace within hyperlink URLs and display text. | /hyperlinks |
Data Source Update Parameters
Update external data connections, ODBC data sources, and linked workbook references.
| Parameter | Description | Example |
|---|---|---|
/datasource |
Enable data source update mode. Find/replace operations apply to data connection strings. | /datasource |
/findconnection:<text> |
Text to find within data connection strings (server names, database names, file paths). | /findconnection:"OLDSERVER" |
/replaceconnection:<text> |
Replacement text for data connection strings. | /replaceconnection:"NEWSERVER" |
/updatelinks |
Also update external workbook link references (e.g., [Budget2024.xlsx] references). |
/updatelinks |
/findlink:<text> |
Text to find within workbook link paths. | /findlink:"\\oldserver\share" |
/replacelink:<text> |
Replacement text for workbook link paths. | /replacelink:"\\newserver\share" |
Image Replacement Parameters
Replace embedded images across spreadsheets (e.g., logos during rebranding).
| Parameter | Description | Example |
|---|---|---|
/replaceimage |
Enable image replacement mode. | /replaceimage |
/findimage:<file> |
Path to the image file to find (matched by content, not filename). Supports .png, .jpg, .bmp, .gif, .emf. | /findimage:"C:\Images\old_logo.png" |
/newimage:<file> |
Path to the replacement image file. | /newimage:"C:\Images\new_logo.png" |
/imagesize:<mode> |
How to handle size differences. Values: original (keep original dimensions), replacement (use new image dimensions), stretch (stretch to fill). Default: original |
/imagesize:original |
Output Parameters
| Parameter | Description | Example |
|---|---|---|
/inplace |
Modify files in place (overwrite originals). Cannot be combined with /outputfolder. |
/inplace |
/outputfolder:<path> |
Write modified files to this folder, preserving originals. Folder is created if it does not exist. | /outputfolder:"C:\Output" |
/backup |
Create a .bak backup of each file before modification. Only applies with /inplace. |
/backup |
/log:<file> |
Write processing log to specified file. | /log:"C:\Logs\excelpipe.log" |
/summary |
Display summary of files processed and replacements made. | /summary |
Advanced Parameters
| Parameter | Description | Example |
|---|---|---|
/silent |
Suppress all dialog boxes and UI prompts. Essential for unattended operation. | /silent |
/noexcel |
Process files without launching Microsoft Excel (uses internal engine). Faster but fewer features. | /noexcel |
/timeout:<seconds> |
Maximum time in seconds per file. Default: 300. | /timeout:120 |
/retries:<count> |
Number of retry attempts for locked files. Default: 0. | /retries:3 |
/password:<pass> |
Password to open protected workbooks. | /password:"secret123" |
/preservemacros |
Preserve VBA macros in .xlsm files (default behaviour). Use /stripmacros to remove them. |
/preservemacros |
/stripmacros |
Remove all VBA macros from processed files. | /stripmacros |
Complete Examples
Simple Find and Replace
Update a fiscal year reference across all spreadsheets:
ExcelPipe.exe /input:"C:\Finance\Budgets" /subfolders /inputmask:"*.xlsx" /find:"FY2024" /replace:"FY2025" /inplace /backup /silent /summary
Data Source Migration
Update ODBC connection strings after a database server migration:
ExcelPipe.exe /input:"C:\Reports" /subfolders /inputmask:"*.xlsx;*.xlsm" /datasource /findconnection:"SQLSERVER01" /replaceconnection:"SQLSERVER02" /updatelinks /findlink:"\\oldnas\data" /replacelink:"\\newnas\data" /inplace /silent /log:"C:\Logs\datasource_migration.log"
Logo Replacement (Rebranding)
Replace company logos across all Excel files after a rebrand:
ExcelPipe.exe /input:"C:\Templates" /subfolders /inputmask:"*.xlsx;*.xltx" /replaceimage /findimage:"C:\Branding\old_logo.png" /newimage:"C:\Branding\new_logo.png" /imagesize:original /inplace /backup /silent /summary
Batch Processing Script
Batch file for scheduled server migration updates:
@echo off
REM ExcelPipe - Update data sources after server migration
REM Schedule via Windows Task Scheduler for off-hours execution
set LOGFILE=C:\Logs\excelpipe_%date:~-4%%date:~4,2%%date:~7,2%.log
"C:\Program Files\DataMystic\ExcelPipe\ExcelPipe.exe" ^
/input:"\\fileserver\shared\Finance" ^
/subfolders ^
/inputmask:"*.xlsx;*.xlsm;*.xls" ^
/datasource ^
/findconnection:"Server=DBPROD01;Database=Finance" ^
/replaceconnection:"Server=DBPROD02;Database=Finance" ^
/find:"\\\\oldnas\\reports" ^
/replace:"\\\\newnas\\reports" ^
/hyperlinks ^
/inplace ^
/backup ^
/silent ^
/log:"%LOGFILE%" ^
/summary
if %ERRORLEVEL% NEQ 0 (
echo ERROR: ExcelPipe failed with code %ERRORLEVEL% >> "%LOGFILE%"
)
echo Processing complete. See %LOGFILE% for details.
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success — all files processed without errors. |
1 |
Partial success — some files processed, but one or more files failed. |
2 |
No files found — no matching files in the input path. |
3 |
Invalid parameters — one or more command-line parameters were invalid. |
4 |
License error — ExcelPipe is not licensed or the trial has expired. |
5 |
Fatal error — unexpected error. Check log for details. |