A simple C# command-line utility to recalculate and convert Excel (.xls, .xlsx) files to PDF using Aspose.Cells.
β Also supports recalculating formulas and saving back to Excel instead of PDF.
This app uses Aspose.Cells, which is not free. You can run the app in evaluation mode, but the output will include watermarks.
- To remove evaluation watermarks, purchase a license from Aspose.
- Place your license file as
aspose.licin the same directory where the app runs.
- .NET 8 SDK
- Works on Windows (other OSes possible via cross-platform build)
dotnet build -c Releasedotnet publish -c Release -r win-x64 --self-contained falseYou can change the runtime identifier (
-r) tolinux-x64,osx-arm64, etc.
ExcelToPdfConverter.exe path\to\input.xlsx path\to\output.pdfExcelToPdfConverter.exe path\to\input.xlsx path\to\output.pdf SheetnameExcelToPdfConverter.exe path\to\input.xlsx path\to\output.xlsx.pdfβ converts Excel to PDF.xlsxβ recalculates and saves as modern Excel format.xlsβ recalculates and saves as legacy Excel format
If no output file is provided, the app will default to generating a
You can test the app directly in VS Code:
dotnet run -- path\to\input.xlsx path\to\output.pdfUse
--to pass arguments to the program.
To debug with arguments, configure launch.json with args.
dotnet run -- "data\report.xlsx" "exports\report.pdf"
dotnet run -- "data\report.xlsx" "exports\report.pdf" Report
dotnet run -- "data\sales.xls" "exports\sales_recalculated.xls"Place your aspose.lic file in the same folder as the .exe or publish directory.
If the license file is not found, the app will continue in evaluation mode with limitations.