Pipelines
Pipelines are custom automated workflows that operate on local Excel or spreadsheet files on your machine. They are designed to automate repetitive tasks, such as data cleaning, transformation, transfer and reporting. Each pipeline consists of a trigger and a series of actions that insert, modify or delete cells, worksheets or entire workbooks.
Pipelines are defined in a JSON format. The pipelines are stored in a dedicated folder, named "Pipelines", within the same directory as the XLSXPipeline executable.
XLSXPipeline.exe
Pipelines/
├── CleanReport.json
├── TransferSalesData.json
├── ApplyAnalytics.json
└── UpdateLeads.json
Example
{
"pipelineName": "Generate Monthly Sales Summary",
"trigger": {
"type": "OnChange",
"path": "C:\Sales\Monthly\SalesData.xlsx"
},
"actions": [
{
"type": "DuplicateSheet",
"sourceName": "Template",
"newName": "Summary"
},
{
"type": "FillFormula",
"sheet": "Summary",
"range": "B2:B100",
"formula": "=SUM(Sales!B2:D2)"
},
{
"type": "CopyFile",
"destinationPath": "C:\Sales\Summaries\",
"fileName": "Summary_{month}_{year}.xlsx"
}
]
}
Triggers
Trigger | Description |
---|---|
Once | Triggers once, as soon as the XLSXPipeline service starts. Takes an optional file path that will be used as the file path for any relevant actions that do not provide a file path. |
Cron Expressions | Triggers on a scheduled basis determined by a cron expression. Takes an optional file path that will be used as the file path for any relevant actions that do not provide a file path. |
Natural Language | Triggers on a scheduled basis determined by a simple natural language option. Examples: 'Every 5 minutes', 'Every 2 hours', 'Every day', 'Every week', 'At 6:15pm'. To be used as a simpler alternative to cron expressions, although cron expressions are preferred. Takes an optional file path that will be used as the file path for any relevant actions that do not provide a file path. |
OnChange | Triggers when a file is updated or if contents of the directory are changed. Requires a path to a file or directory that will be watched for any changes. |
OnNewFile | Triggers when a new file is created in the directory. Requires a path to a directory that will be watched for any new files. |
Actions
Action Description CreateFile Creates a new .xlsx file.
Requires a destination path to a directory or complete file path
to specify a save location for the new file.
An optional file name can be specified if one has not been
included in the destination path.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "CreateFile",
"destinationPath": "C:\Sales\Monthly\,
"fileName": "SalesData.xlsx"
}
DeleteFile Deletes a file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "DeleteFile",
"filePath": "C:\Temp\ToDelete.xlsx",
}
CopyFile Makes a copy of a file.
Requires a destination path to a directory or complete file path
that the copy will be saved to. If a directory path is provided,
the file will be saved with the same name as the original file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "CopyFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"destinationPath": ".\Output\Output.xlsx"
}
MoveFile Moves a file to a new location.
Requires a destination path to a directory or complete file path
that the copy will be moved to. If a directory path is provided,
the file will be saved with the same name as the original file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "MoveFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"destinationPath": ".\Output\Output.xlsx"
}
Rename Renames a file.
Requires a new name for the file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "RenameFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"newName": "SalesData_2023.xlsx"
}
ProtectFile Password protects a file.
Requires a password to be used to protect the file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "ProtectFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"password": "mysecretpassword"
}
UnnprotectFile Removes password protection from file.
Requires a password to be used to unprotect a file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "UnprotectFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"password": "mysecretpassword"
}
ExportToCSV Exports a file to CSV.
Requires a destination path to a directory or complete file path
that the copy will be saved to. If a directory path is provided,
the file will be saved with the same name as the original file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "ExportToCSV",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"destinationPath": ".\Output\Output.csv"
}
ExportToPDF Exports a file to PDF.
Requires a destination path to a directory or complete file path
that the copy will be saved to. If a directory path is provided,
the file will be saved with the same name as the original file.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "ExportToPDF",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
"destinationPath": ".\Output\Output.pdf"
}
OpenFile Opens a file using the default system application for .xlsx files.
An optional file path can be provided to specify the file to
copy. If not provided, the file path from the trigger will be
used.
{
"type": "OpenFile",
"filePath": "C:\Sales\Monthly\SalesData.xlsx",
}