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


Convert Excel to XML via Command Line — Server Batch Converter

You have folders of Excel workbooks that need to feed a SOAP web service, an EDI partner, a regulatory submission, or an ERP integration — and the receiving system speaks XML, not XLSX. Opening each file in Excel and saving it as XML by hand stops working past the second workbook, and Excel's built-in XML export ignores schema requirements that the downstream system actually checks. Total Excel Converter X converts XLS and XLSX files to well-formed XML from the command line, in batch, with no GUI and no Microsoft Excel installation required. Install it on a Windows server, call it from a script or via ActiveX, and let it run unattended.

What Total Excel Converter X Does

  • Batch conversion — pass a wildcard (*.xlsx) and the converter processes every matching workbook in one run
  • Row-to-record XML — each spreadsheet row becomes an XML node, with column headers used as element names
  • Special-character escaping — ampersands, angle brackets, quotes, and control characters are escaped so the output validates against XML parsers
  • UTF-8 and other encodings — output XML in UTF-8, UTF-16, or any single-byte code page required by your downstream system
  • Multi-sheet handling — convert every worksheet in a workbook or pick a single sheet by name or index
  • No Excel required — the converter reads XLS and XLSX directly without Microsoft Office on the server
  • No GUI — runs silently from the command line with no pop-up windows or confirmation dialogs
  • ActiveX / COM — call the converter from .NET, VBScript, PHP, Python, or any COM-compatible environment to embed conversion into your own application
  • .bat scripting — save commands in batch files and schedule them with Windows Task Scheduler for fully automated conversion

Download Free Trial

(30 days, no email)

Buy License

(server license, perpetual)

Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022

Excel vs XML: Why Convert?

Excel is a grid. Rows and columns hold values, and the meaning of each column lives in a header row that humans read. The format is great for analysts, terrible for system integration. SOAP services, EDI gateways, regulatory portals, banking interfaces, and HL7 healthcare messages do not parse XLSX. They expect XML with explicit element names, defined nesting, and predictable escaping rules.

XML is hierarchical and self-describing. Each value carries an element name, the document validates against a schema, and any platform — Linux, Java, .NET, IBM mainframes — can parse it without proprietary libraries. When Excel data has to enter that world, it has to become XML first. Total Excel Converter X writes valid XML where every Excel row turns into a record node, the header row supplies field names, and special characters are escaped so the output passes through any XML parser cleanly.

Excel (XLS/XLSX)XML
ShapeTwo-dimensional gridHierarchical tree
Field namesImplicit (header row)Explicit on every record
ValidationNone at file levelSchema (XSD, DTD)
ConsumersHumans, Excel-aware toolsSOAP, EDI, ERP, HL7, regulators
Cross-platformBest on Windows + OfficeUniversal — every language and OS

How to Convert Excel to XML from the Command Line

Step 1. Install Total Excel Converter X

Download the installer from the link above and run it on your Windows server or workstation. The setup takes under a minute. No Microsoft Excel installation is required — the converter reads XLS and XLSX directly with its own parser, including formulas, styles, and multi-sheet workbooks.

Step 2. Open the Command Prompt

Open cmd.exe or PowerShell. The converter executable is XLSConverter.exe, located in the installation folder (typically C:\Program Files\CoolUtils\TotalExcelConverterX\). Add it to your system PATH or use the full path in your commands.

Step 3. Run the Basic Conversion

The simplest command converts all Excel files in a folder to XML:

XLSConverter.exe C:\Sheets\*.xlsx C:\Output\ -c XML

This processes every .xlsx file in C:\Sheets\ and saves the resulting XML files in C:\Output\. Each workbook produces one XML file with the same base name. Each row in the source becomes a <Row> element, and each cell becomes a child element named after the corresponding column header.

Step 4. Add Encoding and Schema Options

Control the XML output with additional flags:

XLSConverter.exe C:\Sheets\*.xlsx C:\Output\ -c XML -Encoding UTF-8 -FirstRowAsHeader true -log C:\Logs\xls2xml.log
  • -Encoding UTF-8 — set the XML encoding (UTF-8, UTF-16, Windows-1252, ISO-8859-1)
  • -FirstRowAsHeader true — use row 1 as element names instead of generic Column1, Column2
  • -Sheet "Invoices" — convert only the named worksheet instead of every sheet
  • -log C:\Logs\xls2xml.log — write a conversion log for verification

Step 5. Automate with a .bat File

Save your command in a .bat file and schedule it with Windows Task Scheduler:

@echo off
"C:\Program Files\CoolUtils\TotalExcelConverterX\XLSConverter.exe" C:\Incoming\*.xlsx C:\Archive\XML\ -c XML -Encoding UTF-8 -FirstRowAsHeader true -log C:\Logs\xls2xml.log

This runs the conversion every night (or at whatever interval you set) and writes a log file so you can verify the results. Drop new workbooks into C:\Incoming\ during the day, and the integration pipeline picks them up automatically.

ActiveX / COM Integration

Total Excel Converter X includes a full ActiveX interface. You can call the converter from any COM-compatible environment — .NET, VBScript, PHP, Python, Ruby, or ASP. This lets you embed Excel-to-XML conversion into your own web application, integration broker, or document workflow without shelling out to a command-line process.

Example (C#/.NET):

XLSConverterX Cnv = new XLSConverterX();
Cnv.Convert("C:\\Sheets\\invoices.xlsx", "C:\\Output\\invoices.xml", "-c XML -Encoding UTF-8 -FirstRowAsHeader true -log c:\\Logs\\xls.log");

Example (PHP):

$c = new COM("XLSConverter.XLSConverterX");
$c->convert("C:\\Sheets\\invoices.xlsx", "C:\\Output\\invoices.xml", "-c XML -Encoding UTF-8 -FirstRowAsHeader true -log c:\\Logs\\xls.log");

The same call works from ASP.NET, VBScript, Python, Ruby, Perl, and JavaScript (Windows Script Host). Your integration layer can accept uploaded Excel files, convert them to XML in memory, and forward the XML payload directly to a SOAP endpoint or an ERP queue.

Online Converters vs Total Excel Converter X

FeatureOnline ConvertersTotal Excel Converter X
Batch processingOne file at a timeUnlimited files per batch
Data privacyWorkbooks uploaded to third-party serverFiles never leave your machine
Encoding controlUTF-8 only, often brokenUTF-8, UTF-16, Windows-1252, ISO-8859-1
Special-char escapingInconsistent, often invalid XMLFull escaping for &, <, >, ", control chars
Multi-sheet workbooksFirst sheet onlyAll sheets or named sheet
AutomationManual onlyCommand line, .bat, Task Scheduler, ActiveX
Server deploymentNot possibleDesigned for servers, no GUI needed
Requires Excel installedN/ANo
Requires internetYesNo

When You Need Excel to XML Command-Line Conversion

  • Feeding a SOAP web service. The trading partner accepts XML envelopes, not spreadsheets. A nightly .bat job converts the day's order workbooks to XML and posts them to the SOAP endpoint via curl.
  • Regulatory and tax filings. Tax authorities, financial regulators, and e-invoicing portals (think SAF-T, FatturaPA, Peppol BIS, or XBRL-precursor uploads) require XML. Accountants prepare the data in Excel, the converter turns it into compliant XML.
  • EDI partner exchange. An EDI gateway expects XML messages for purchase orders, shipping notices, or remittance advice. The converter bridges Excel-based business users and the XML-based partner system.
  • ERP and CRM synchronization. SAP, Dynamics, NetSuite, and Salesforce ingest data via XML import. A scheduled batch run keeps the ERP in sync with operational spreadsheets.
  • Healthcare HL7 and clinical data. Lab results and patient records arrive in Excel from external sources. The converter produces XML that fits an HL7 v3 or FHIR-XML pipeline.
  • Cross-platform integration. The downstream system runs on Linux, AIX, or a mainframe. XML is the lingua franca; the converter produces it on Windows and ships it across the boundary.

Why Total Excel Converter X

No Excel Required

The converter reads XLS and XLSX directly with its own parser. You do not need Microsoft Office, LibreOffice, or any spreadsheet application installed on the server. This avoids licensing costs and the well-known instability of automating Excel in unattended scenarios.

True Server Application

Total Excel Converter X is designed for unattended use. No GUI windows, no dialog boxes, no confirmation prompts. It runs silently from the command line or as part of a service — exactly what a production integration server needs.

Valid, Parser-Ready XML

The output is well-formed XML. Ampersands become &amp;, angle brackets become &lt; and &gt;, quotes inside attributes are escaped, and stray control characters are stripped. The XML passes through any standards-compliant parser without choking on a customer name that happened to contain an ampersand.

Not Just XML

The same command-line tool converts Excel to PDF, DOC, HTML, CSV, JSON, ODS, TXT, and more. One installation covers all your spreadsheet conversion needs. Change -c XML to -c JSON and you get JSON output with the same batch and automation features.

Download Free Trial

(30 days, no email or credit card)

Buy License

(server license, perpetual)

Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022


quote

Total Excel Converter X Customer Reviews 2026

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

"Our shipping partner accepts purchase orders only as XML over SOAP, but the operations team builds them in Excel. Total Excel Converter X runs as a scheduled .bat on the integration server and turns the daily order workbook into XML in under three seconds. The escaping handles the special characters in customer names that broke our previous in-house parser. Drop-in replacement for a homegrown VBA script that nobody wanted to maintain."

5 Star Andreas Vogt Integration Engineer, Logistik AG

"We trade EDI documents with about forty retail partners, and a third of them want XML envelopes instead of X12 or EDIFACT. The converter sits between our spreadsheet-based order desk and the EDI gateway. Header-row mapping means each partner's XML schema lines up with the column names we already use. Encoding is set per partner via the command line. No surprises in production."

5 Star Priya Subramanian EDI Specialist, Wholesale Distribution

"We file regulatory returns to the central bank in XML on a weekly cadence. The source data is reconciled in Excel by the finance team and then has to become a strictly encoded XML payload. The converter's UTF-8 output and clean ampersand escaping pass the regulator's validator on the first try. We still post-process the output through XSLT to fit the exact target schema, but the conversion step itself is reliable and fast."

4 Star Marc Lefevre Regulatory Reporting Lead, Banque Mutuelle

FAQ ▼

The basic command is: XLSConverter.exe C:\Sheets\*.xlsx C:\Output\ -c XML. This converts every Excel workbook in the source folder to XML. Add flags like -Encoding UTF-8, -FirstRowAsHeader true, or -log to control the output structure and encoding.
Yes. Pass -FirstRowAsHeader true and the converter uses each column header as the element name for that field, so a CustomerName column produces <CustomerName> elements. Without that flag the converter falls back to generic Column1, Column2 tags. Row nodes default to <Row>; this gives you a predictable, regular structure that maps cleanly to most consuming schemas.
UTF-8, UTF-16, Windows-1252, and ISO-8859-1 are all supported via the -Encoding flag. UTF-8 is the safe default for SOAP, EDI, and most modern integrations. Use UTF-16 when a downstream system specifically requires it, or a Windows code page when feeding a legacy partner that expects single-byte XML.
The converter escapes them automatically. Ampersands become &amp;, angle brackets become &lt; and &gt;, double quotes inside attribute values become &quot;, and stray control characters that would break an XML 1.0 parser are stripped. The output validates against any standards-compliant parser without manual cleanup.
By default every worksheet is converted — you get one XML file per sheet, named after the source workbook plus the sheet name. Pass -Sheet "Invoices" to convert only one named worksheet, or -Sheet 1 to pick by zero-based index. Hidden sheets and chart sheets are skipped.
The converter produces well-formed XML that any standards-compliant parser will accept. Whether it validates against your specific XSD depends on how closely your column headers match the schema's element names and required nesting. For strict regulatory schemas, run the output through a transform (XSLT, or an integration broker) that maps the regular row-by-row structure into the target hierarchy.
Yes. Total Excel Converter X registers as a COM/ActiveX object (XLSConverter.XLSConverterX). You can call it from .NET, PHP, Python, VBScript, ASP, Ruby, Perl, and any other COM-compatible environment to convert Excel uploads to XML in real time and forward the result to a SOAP endpoint or message queue.

 

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 • 120 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