Logo
Home Products Support Contact About Us
arrow1 File Converters
arrow1 TIFF and PDF apps
arrow1 Forensic
arrow1 Freeware

Convert XLSX to PDF via Command Line — Automate Excel-to-PDF on Servers

 

Generating PDF reports from Excel spreadsheets by hand wastes hours every week. When your workflow involves hundreds of XLSX files or runs unattended on a server, you need a converter that works without a GUI. Total Excel Converter X converts XLSX to PDF via command line and ActiveX, so you can automate the entire process from a script, a scheduled task, or your own application. Our command-line XLSX to PDF converter:
  • Runs without a GUI — no pop-ups, no user interaction required
  • Converts single files or entire folders of XLSX spreadsheets to PDF in one call
  • Supports PDF encryption with user and owner passwords
  • Controls page size, orientation, margins, headers, and footers from command-line flags
  • Integrates into .NET, PHP, Python, ASP, Ruby, Pascal, and Perl applications via ActiveX (COM)
  • Logs errors silently to a file instead of displaying message boxes

Download Total Excel Converter X and start automating XLSX-to-PDF conversion on your server today.

 

Download Now!

(includes 30 day FREE trial)

Buy License

(server license)

XLSX vs PDF: Why Convert on the Server?

XLSX is an editable spreadsheet format. Layout depends on installed fonts, Excel version, and printer driver — the same file looks different on different machines. Recipients can change cell values, break formulas, or see data you did not intend to share.

PDF freezes the page layout. Fonts are embedded, geometry is locked, and every viewer renders the same result. PDF encryption controls who can view, print, or copy the contents.

On a server, the difference matters even more. There is no monitor, no mouse, and no Excel installation. A command-line converter reads the XLSX file with its own parser, applies your formatting rules, and writes a finished PDF — no human intervention, no Microsoft Office dependency.

FeatureXLSXPDF
EditabilityFully editableView and print only
Layout consistencyVaries by systemIdentical everywhere
Font embeddingNoYes
Password protectionLimitedFull (view, print, copy control)
Viewer requiredExcel or compatible appAny PDF reader (free)
Server-friendlyNeeds Office or parserStatic file, no special software

How to Convert XLSX to PDF via Command Line

  • Step 1. Download and install Total Excel Converter X on your Windows server or workstation.
  • Step 2. Open a command prompt (cmd.exe) or PowerShell window.
  • Step 3. Run a single-file conversion:
    ExcelConverterX.exe C:\Data\report.xlsx C:\Output\report.pdf -cPDF
  • Step 4. Convert an entire folder in batch:
    ExcelConverterX.exe C:\Data\*.xlsx C:\Output\ -cPDF -PageSize:A4 -Landscape
  • Step 5. Add PDF encryption and a log file:
    ExcelConverterX.exe C:\Data\*.xlsx C:\Output\ -cPDF -OwnerPassword:secret -UserPassword:open123 -log C:\Logs\excel.log
  • Step 6. Save the command as a .bat file and attach it to Windows Task Scheduler for fully unattended conversion on a daily, hourly, or event-driven schedule.

Total Excel Converter X - command line XLSX to PDF

All error messages go to the log file. The converter exits silently, so your scripts and scheduled tasks run without interruption.

ActiveX Integration (COM Object)

Total Excel Converter X registers a COM object (ExcelConverter.ExcelConverterX) that you can call from any language that supports COM/ActiveX. This lets you convert XLSX to PDF from inside your web application, ERP system, or data pipeline without shelling out to a process.

.NET (C#):

ExcelConverterX cnv = new ExcelConverterX();
cnv.Convert(@"C:\Data\report.xlsx", @"C:\Output\report.pdf",
            "-cPDF -PageSize:A4 -log C:\Logs\excel.log");

PHP:

$c = new COM("ExcelConverter.ExcelConverterX");
$c->convert("C:\\Data\\report.xlsx", "C:\\Data\\report.pdf",
            "-cPDF -log C:\\Logs\\excel.log");

Python:

import win32com.client
c = win32com.client.Dispatch("ExcelConverter.ExcelConverterX")
c.convert(r"C:\Data\report.xlsx", r"C:\Data\report.pdf",
          "-cPDF -log C:\Logs\excel.log")

ASP, Ruby, Pascal, Perl, and JavaScript (WSH) are also supported. See the product page for more examples.

Why Use Total Excel Converter X?

No GUI, no Office dependency

The converter reads XLSX, XLS, XLSM, ODS, XML, and other spreadsheet formats with its own parser. Microsoft Excel is not required. There is no graphical interface — the program runs as a console process or COM object, making it safe for Windows Server environments where interactive services are disabled.

Batch and folder conversion

Pass a wildcard (*.xlsx) to convert every spreadsheet in a folder with a single command. Combine multiple XLSX files into one PDF, or split each worksheet into a separate file. A built-in renamer adds counters or sheet names to output filenames automatically.

PDF encryption and security

Set a user password (required to open the PDF) and an owner password (controls print, copy, and edit permissions) directly from the command line. Financial reports, salary tables, and compliance documents stay protected without manual steps.

Full page layout control

Specify paper size (A4, Letter, Legal, custom), orientation, and margins via flags. Add headers and footers with page numbers, dates, file names, or custom text. Fit wide tables to page width automatically.

Silent logging

Every conversion writes status and errors to a log file. No message boxes, no pop-ups, no user prompts. Monitor the log from your application or send it to a centralized logging system.

20+ output formats

Besides PDF, convert XLSX to DOC, DOCX, HTML, CSV, TIFF, JPEG, XML, TXT, ODS, SQL, LaTeX, and more — all with the same command-line syntax. One tool covers every format your pipeline needs.

Online Converters vs Command-Line Converter

FeatureOnline ToolsTotal Excel Converter X
File size limit10–100 MBNo limit
Batch conversionLimited or paid APIUnlimited (wildcard)
PrivacyFiles uploaded to cloud100% local processing
PDF encryptionRarely availableBuilt-in (user + owner passwords)
Page layout controlMinimalFull (size, margins, headers)
Server integrationREST API (paid)COM/ActiveX + command line
Office dependencyNone (cloud)None (standalone parser)
AutomationManual or API calls.bat files + Task Scheduler
PricingSubscription per monthOne-time server license

download command line XLSX to PDF converter

Windows Server 2008–2022 • Windows 7/8/10/11 • 30-day free trial

When Do You Need Command-Line XLSX to PDF Conversion?

There are several scenarios where a command-line converter is the right tool:
  1. Automated report generation. Your ERP or BI platform exports XLSX files nightly. A scheduled task picks them up, converts to encrypted PDF, and emails them to stakeholders — all without human intervention.
  2. Web application back-end. Users upload spreadsheets through a web form. Your server-side code calls the ActiveX object, converts the file to PDF, and returns the download link in real time.
  3. Compliance archiving. Financial regulations require fixed-format document storage. A batch script converts incoming XLSX invoices and statements to PDF for long-term archival.
  4. Print-ready distribution. Sales teams need formatted price lists and product catalogs as PDFs. The converter produces identical output regardless of the recipient's installed fonts or Excel version.
  5. Multi-format data pipelines. ETL workflows export data to XLSX, then convert subsets to PDF for management, CSV for databases, and HTML for internal dashboards — all from the same command-line tool.

 

Download Now!

(includes 30 day FREE trial)

Buy License

(server license)


quote

Total Excel Converter X Customer Reviews 2026

Rate It
Rated 4.7/5 based on customer reviews
5 Star

"We process 400+ financial reports every night. Total Excel Converter X sits behind a Task Scheduler job, converts all incoming XLSX files to encrypted PDFs, and logs everything. Zero manual intervention since we set it up two years ago."

5 Star Daniel Krause DevOps Engineer

"The ActiveX integration saved us weeks of development. Three lines of PHP code and our intranet app converts uploaded spreadsheets to PDF on the fly. No Office dependency, no temp file cleanup issues."

5 Star Mariana Costa Senior PHP Developer

"Solid command-line tool. Handles batch conversion of XLS and XLSX to PDF without any problems on our Windows Server 2019 setup. The logging is clean and easy to integrate with our monitoring stack."

4 Star James Whitfield IT Infrastructure Manager

FAQ ▼

Run ExcelConverterX.exe with the source file, destination, and the -cPDF flag. Example: ExcelConverterX.exe C:\Data\report.xlsx C:\Output\report.pdf -cPDF. Use wildcards (*.xlsx) to convert an entire folder in one command.
No. Total Excel Converter X reads XLSX, XLS, XLSM, ODS, and other spreadsheet formats with its own parser. No Microsoft Office installation is required on the server.
Yes. Add -OwnerPassword and -UserPassword flags to the command. The owner password controls print, copy, and edit permissions. The user password is required to open the PDF.
Total Excel Converter X registers a COM object (ExcelConverter.ExcelConverterX) that works with .NET, PHP, Python, ASP, Ruby, Pascal, Perl, and JavaScript. Call the Convert method with source path, destination path, and conversion flags.
Yes. The converter can merge several spreadsheets into one PDF output file. You can also split each worksheet into a separate PDF if needed.
You can set paper size (A4, Letter, Legal, custom), orientation (-Landscape or -Portrait), margins, and header/footer text with page numbers, dates, or file names. The -FitToWidth flag adjusts wide tables automatically.
Yes. Total Excel Converter X runs on Windows Server 2008 through 2022 as well as Windows 7/8/10/11. It has no GUI and produces no pop-up messages, making it safe for non-interactive server environments.

 

Start working now!

Download free trial and convert your files in minutes.
No credit card or email required.

⬇ Download Free Trial Windows 7/8/10/11 • 95 MB

Examples of Total Excel ConverterX

Convert excel files With TotalExcelConverterX and .NET


string src="C:\\test\\Source.xlsx";
string dest="C:\\test\\Dest.PDF";

ExcelConverterX Cnv = new ExcelConverterX();
Cnv.Convert(src, dest, "-c PDF -log c:\\test\\Excel.log");

MessageBox.Show("Convert complete!");

Convert Excel Files On Web Servers With Total Excel ConverterX

public static class Function1
    {
        [FunctionName("Function1")]
        public static async Task Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            StringBuilder sbLogs = new StringBuilder();
            sbLogs.AppendLine("started...");
            try
            {
                ProcessStartInfo startInfo = new ProcessStartInfo();
                startInfo.CreateNoWindow = true;
                startInfo.UseShellExecute = false;
                var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4);

                var executablePath = $@"{assemblyDirectoryPath}\Converter\ExcelConverterX.exe";
                sbLogs.AppendLine(executablePath + "...");
                var msgPath = $@"{assemblyDirectoryPath}\MSG\MSG-1.xlsx";
                var outPath = Path.GetTempFileName() + ".pdf";
                startInfo.FileName = executablePath;

                if (File.Exists(outPath))
                {
                    File.Delete(outPath);
                }

                if (File.Exists(executablePath) && File.Exists(msgPath))
                {
                    sbLogs.AppendLine("files exists...");
                }
                else
                    sbLogs.AppendLine("EXE & MSG files NOT exists...");
                startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                startInfo.Arguments = $"{msgPath} {outPath}";
                using (Process exeProcess = Process.Start(startInfo))
                {
                    sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}");
                    exeProcess.WaitForExit();
                    sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}");
                }

                int sleepCounter = 10;

                while(!File.Exists(outPath) && sleepCounter > 0)
                {
                    System.Threading.Thread.Sleep(1000);
                    sbLogs.AppendLine("sleep...");
                    sleepCounter--;
                }
                if (File.Exists(outPath))
                    sbLogs.AppendLine("Conversion complete successfully.");
            }
            catch (Exception ex)
            {
                sbLogs.AppendLine(ex.ToString());
            }

            return new OkObjectResult(sbLogs);
        }
    }
Some more infromation about Azure.

Convert Excel Files On Web Servers With Total Excel ConverterX

dim C
Set C=CreateObject("ExcelConverter.ExcelConverterX")
C.Convert "c:\test\source.xlsx", "c:\test\dest.pdf", "-cPDF -log c:\test\Excel.log"
Response.Write C.ErrorMessage
set C = nothing
Example2 ASP: directly stream the resulting PDF
dim C
Set C=CreateObject("ExcelConverter.ExcelConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf"
Response.BinaryWrite c.ConvertToStream("C:\www\ASP\Source.xlsx", "C:\www\ASP", "-cpdf  -log c:\html.log")
set C = nothing

Convert Excel Spreadsheets by PHP With Total Excel ConverterX

$src="C:\\test\\test.XLS";
$dest="C:\\test\\test.CSV";
if (file_exists($dest)) unlink($dest);
$c= new COM("ExcelConverter.ExcelConverterX");
$c->convert($src,$dest, "-c csv  -log c:\\test\\xls.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

Convert Excel Spreadsheets By Ruby With Total Excel ConverterX

require 'win32ole'
c = WIN32OLE.new('ExcelConverter.ExcelConverterX')

src="C:\\test\\test.xlsx";
dest="C:\\test\\test.pdf";

c.convert(src,dest, "-c PDF -log c:\\test\\Excel.log");

if not File.exist?(dest)
  puts c.ErrorMessage
end

Convert Excel Spreadsheets by Python With Total Excel ConverterX

import win32com.client
import os.path

c = win32com.client.Dispatch("ExcelConverter.ExcelConverterX")

src="C:\\test\\test.xlsx";
dest="C:\\test\\test.pdf";

c.convert(src, dest, "-c PDF -log c:\\test\\Excel.log");

if not os.path.exists(file_path):
  print(c.ErrorMessage)

Convert Excel files With Pascal and Total Excel ConverterX

uses Dialogs, Vcl.OleAuto;

var
  c: OleVariant;
begin
  c:=CreateOleObject('ExcelConverter.ExcelConverterX');
  C.Convert('c:\test\source.xlsx', 'c:\test\dest.pdf', '-cPDF -log c:\test\Excel.log');
  IF c.ErrorMessage<>'' Then
    ShowMessage(c.ErrorMessage);
end;

Convert Excel and ODS Files On Web Servers With Total Excel ConverterX

var c = new ActiveXObject("ExcelConverter.ExcelConverterX");
c.Convert("C:\\test\\source.xlsx", "C:\\test\\dest.pdf", "-c PDF");
if (c.ErrorMessage!="")
  alert(c.ErrorMessage)

Convert Excel Spreadsheets by Perl With Total Excel ConverterX

use Win32::OLE;

my $src="C:\\test\\test.XLS";
my $dest="C:\\test\\test.CSV";

my $c = CreateObject Win32::OLE 'ExcelConverter.ExcelConverterX';
$c->convert($src,$dest, "-c csv  -log c:\\test\\xls.log");
print $c->ErrorMessage if -e $dest;

Support
Total Excel Converter X Preview1

Latest News

Newsletter Subscribe

No worries, we don't spam.


© 2026. All rights reserved. CoolUtils File Converters

Cards