Catalog · How the catalog works
excel-to-pdf-converter
Minimal examples for **Total Excel Converter X (ActiveX)**. Automate batch conversion of XLS/XLSX/CSV/ODS to PDF/TIFF/HTML/TXT via COM from C#, Delphi, VBScript, and PowerShell. Includes sheet/range selection, page setup, fit-to-page, headers/footers, merge, watermarks, and logging.
- ★ 1 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
Excel to PDF Converter
Delphi project for converting Excel files (XLS, XLSX) to PDF format using TotalExcelConverterX COM component.
Requirements
- Delphi
- TotalExcelConverterX installed on the system
- Download from: https://www.coolutils.com/TotalExcelConverterX
- Windows OS
Description
This project provides a simple interface for converting Microsoft Excel spreadsheets to PDF documents using the TotalExcelConverterX COM object from CoolUtils.
Supported Input Formats
- XLS - Microsoft Excel 97-2003 spreadsheets
- XLSX - Microsoft Excel 2007+ spreadsheets
- XLSM - Excel macro-enabled workbooks
- XLSB - Excel binary workbooks
- SQLite - SQLite database
- CSV - Comma-separated values files
Features
- Excel to PDF conversion
- Support for multiple Excel formats
- Error handling and logging
- Preserve spreadsheet formatting in PDF output
- Configurable conversion parameters
- Simple and clean code structure
Installation
Step 1: Install TotalExcelConverterX
- Download TotalExcelConverterX from https://www.coolutils.com/TotalExcelConverterX
- Install and register the component on your system
- Make sure the COM object is properly registered
Step 2: Clone and Build Project
git clone https://github.com/yourusername/excel-to-pdf-converter.git
cd excel-to-pdf-converterOpen the project in Delphi 10.4 or later, build and run.
Usage
Basic Example
uses
Dialogs,
Vcl.OleAuto;
var
Converter: OleVariant;
begin
Converter := CreateOleObject('ExcelConverter.ExcelConverterX');
Converter.Convert('c:\test\source.xlsx', 'c:\test\dest.pdf', '-cPDF -log c:\test\Excel.log');
if Converter.ErrorMessage <> '' then
ShowMessage(Converter.ErrorMessage);
end;Using TExcelConverter Class
var
Converter: TExcelConverter;
begin
Converter := TExcelConverter.Create;
try
if Converter.ConvertExcelToPDF('spreadsheet.xlsx', 'output.pdf', 'conversion.log') then
ShowMessage('Conversion completed!')
else
ShowMessage('Error: ' + Converter.LastError);
finally
Converter.Free;
end;
end;Configuration
You can modify the following parameters in the Convert method:
- Source file path - path to input XLS/XLSX file
- Destination PDF file path - path to output PDF file
- Conversion options:
-cPDF- output format (note: no space after -c)-log <path>- log file path- Additional parameters supported by TotalExcelConverterX
Error Handling
The application checks for error messages returned by the converter and displays them using a message dialog. All errors are also logged to the specified log file.
Project Structure
excel-to-pdf-converter/
????????? README.md
????????? LICENSE
????????? .gitignore
????????? uExcelConverter.pas # Main converter unit
????????? ExcelToPDFConverter.dpr # Example programLicense
MIT License - see LICENSE file for details
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Author
Alexander Buzaev
Acknowledgments
- CoolUtils for TotalExcelConverterX component
- https://www.coolutils.com/TotalExcelConverterX
Support
For issues with TotalExcelConverterX component, please refer to:
- Official documentation: https://www.coolutils.com/TotalExcelConverterX
- CoolUtils support
For issues with this Delphi wrapper, please open an issue on GitHub.

