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


Convert HTML to XLS via Command Line — Server Batch Converter

You have folders of HTML files or scraped web pages full of <table> data — financial reports, product catalogues, exported analytics dashboards — and you need them as real Excel spreadsheets so analysts can sort, filter, sum, and pivot. Opening each file in a browser and copy-pasting tables into Excel breaks formulas and ruins formatting after the second file. Total HTML Converter X converts HTML files to XLS 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 HTML Converter X Does

  • Batch conversion — pass a wildcard (*.html) and the converter processes every matching file in one run
  • Editable XLS output — produces real Excel spreadsheets with cells, rows, and columns — values land in proper cells, ready for formulas and pivot tables
  • HTML table parsing — recognizes <table>, <tr>, <td>, <th>, colspan and rowspan, and inline styles that affect cell content
  • Encoding control — set the code page so non-ASCII data (currencies, accented names, CJK characters) lands in cells without corruption
  • No Excel required — the converter writes XLS 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

HTML to XLS command line conversion

Download Free Trial

(30 days, no email)

Buy License

(server license, perpetual)

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

HTML vs XLS: Why Convert?

HTML displays tabular data, but it does not store it as a spreadsheet. A <table> in a browser is read-only markup — you cannot sort a column, filter rows, write a SUM formula, or build a pivot. The numbers are text inside cells, not numeric values an analyst can compute against.

XLS is the Microsoft Excel format that turns the same data into a working spreadsheet. Each cell holds a typed value — number, date, string — that supports formulas, sorting, filtering, conditional formatting, and pivot tables. When data trapped inside HTML pages needs to enter an analytical workflow, it has to become XLS first.

HTMLXLS
Data typeText inside <td> tagsTyped cell values (number, date, string)
Sorting and filteringNot supportedBuilt into Excel
FormulasNoneSUM, AVERAGE, VLOOKUP, pivot tables
AudienceWeb visitorsAnalysts, accountants, finance teams
WorkflowWeb displayReporting, modelling, BI imports

How to Convert HTML to XLS from the Command Line

Step 1. Install Total HTML 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 browser or Microsoft Excel installation is required — the converter parses the HTML and writes XLS directly using its own engine, with full support for HTML tables, colspan and rowspan, and embedded CSS styles.

Step 2. Open the Command Prompt

Open cmd.exe or PowerShell. The converter executable is HTMLConverter.exe, located in the installation folder (typically C:\Program Files\CoolUtils\TotalHTMLConverterX\). 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 HTML files in a folder to XLS:

HTMLConverter.exe C:\Pages\*.html C:\Output\ -c XLS

This processes every .html file in C:\Pages\ and saves the resulting XLS files in C:\Output\. Each HTML file produces one XLS with the same base name. Tables in the source land as cell ranges; numeric strings become numeric values an analyst can compute against.

Step 4. Add Encoding, Sheet, and Logging Options

Control the XLS output with additional flags:

HTMLConverter.exe C:\Pages\*.html C:\Output\ -c XLS -CodePage 65001 -Sheet ReportData -log C:\Logs\html2xls.log
  • -CodePage 65001 — set encoding (65001 = UTF-8, 1252 = Western, 1251 = Cyrillic, 932 = Shift-JIS)
  • -Sheet ReportData — name the resulting worksheet inside the XLS
  • -FirstRowAsHeader 1 — mark the first row of each table as a header row in the XLS
  • -log C:\Logs\html2xls.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\TotalHTMLConverterX\HTMLConverter.exe" C:\Incoming\*.html C:\Archive\XLS\ -c XLS -CodePage 65001 -Sheet Data -log C:\Logs\html2xls.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 a fresh batch of HTML reports into C:\Incoming\ and pick up XLS files from C:\Archive\XLS\ the next morning.

ActiveX / COM Integration

Total HTML 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 HTML-to-XLS conversion into your own web application, intranet portal, or reporting service without shelling out to a command-line process.

Example (C#/.NET):

HTMLConverterX Cnv = new HTMLConverterX();
Cnv.Convert("C:\\Pages\\report.html", "C:\\Output\\report.xls", "-c XLS -CodePage 65001 -log c:\\Logs\\html.log");

Example (PHP):

$c = new COM("HTMLConverter.HTMLConverterX");
$c->convert("C:\\Pages\\report.html", "C:\\Output\\report.xls", "-c XLS -CodePage 65001 -log c:\\Logs\\html.log");

The same call works from ASP.NET, VBScript, Python, Ruby, Perl, and JavaScript (Windows Script Host). Your web application can accept an uploaded HTML page or a URL and return a working XLS spreadsheet to the user in real time.

Online Converters vs Total HTML Converter X

FeatureOnline ConvertersTotal HTML Converter X
Batch processingOne file at a timeUnlimited files per batch
File privacyFiles uploaded to third-party serverFiles never leave your machine
Table parsingBasic; merged cells often brokenFull <table> support, colspan/rowspan preserved
Numeric valuesOften saved as text stringsNumbers land as numeric cells, formulas work
Encoding controlGuessed automaticallyExplicit -CodePage flag, no guesswork
AutomationManual onlyCommand line, .bat, Task Scheduler, ActiveX
Server deploymentNot possibleDesigned for servers, no GUI needed
Requires Excel installedN/ANo
Requires internetYesNo

When You Need HTML to XLS Command-Line Conversion

  • Scraping tables off websites. A research team pulls HTML pages from public registries, regulators, or competitor catalogues. The converter turns each page into XLS overnight; analysts open the result in Excel and run filters and pivots the next morning.
  • Financial reports out of HTML dashboards. An internal BI tool emits HTML reports with tables of revenue, margin, and headcount. Finance wants the same data in Excel for modelling. A nightly .bat job converts the latest report and drops it in a shared folder.
  • Migrating data out of a legacy web application. An older intranet system shows tabular records as HTML pages with no export feature. A scripted bulk conversion turns thousands of pages into XLS files for import into a new database or ERP.
  • Generating spreadsheets for non-technical staff. A monitoring tool publishes status tables as HTML. Operations want them as XLS to highlight rows, sort by status, and email to vendors. A scheduled job handles it without a human touching the files.
  • Eliminating Microsoft Excel on servers. Running Excel in unattended mode is unsupported and unreliable. Total HTML Converter X writes XLS files directly with no Office dependency — safe for headless production servers.

Why Total HTML Converter X

No Excel Required

The converter writes valid XLS files directly. 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 — no orphan EXCEL.EXE processes, no DCOM identity issues, no random hangs.

True Server Application

Total HTML 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 server needs. Running it under a Windows scheduled task or as part of a CI pipeline is straightforward.

Real Cells, Not Flattened Text

The XLS output contains typed cell values, not a wall of text dumped into column A. Numbers are numbers, dates are dates, strings are strings. Excel sorts, filters, and formulas work on the result without any post-processing. Header rows and merged cells from the source HTML carry over to the spreadsheet.

Not Just XLS

The same command-line tool converts HTML to PDF, DOC, TIFF, JPEG, RTF, TXT, and more. One installation covers all your HTML conversion needs. Change -c XLS to -c PDF and you get PDF output with the same batch and automation features — useful when finance wants XLS but legal wants signed PDF of the same source.

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 HTML Converter X Customer Reviews 2026

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

"We pull competitor pricing from a dozen public catalogue sites every night. The pages are HTML tables, but our pricing model lives in Excel. Total HTML Converter X turns the scraped pages into XLS files in one .bat job, with numeric cells in the right format so VLOOKUP works against them immediately. The -CodePage flag fixed the accented product names that our previous tool was mangling."

5 Star Priya Ramanathan Senior Data Analyst, Retail Analytics

"Our SaaS exports HTML reports for customers, but enterprise clients keep asking for XLS. We embedded the ActiveX interface into our PHP backend so the same HTML report can be delivered as a working spreadsheet on demand. The COM call returns a real XLS with sortable columns, not a dump of text into column A. Dropped Excel automation from our server stack the same week."

5 Star Tobias Kleinmann Backend Developer, Reporting Platform

"We migrated a legacy intranet that displayed budget data as HTML tables on thousands of pages. The bulk conversion to XLS ran over a weekend on a single Windows Server 2019 box, no Office license needed, and finance imported the resulting spreadsheets straight into their new system. Documentation around the more obscure flags could be richer, but support replied within a day when we had a question on encoding."

4 Star Rosa Fernandez IT Manager, Municipal Government

FAQ ▼

The basic command is: HTMLConverter.exe C:\Pages\*.html C:\Output\ -c XLS. This converts every HTML file in the source folder to XLS. Add flags like -CodePage 65001, -Sheet ReportData, or -log to control the output.
No. Total HTML Converter X writes XLS files directly without Microsoft Excel, LibreOffice, or any spreadsheet application installed. This avoids Office licensing on the server and the well-known instability of automating Excel in unattended scenarios.
Yes. <table>, <tr>, <td>, and <th> elements map to rows and columns in the XLS. Colspan and rowspan are preserved as merged cells. Numeric strings become numeric values that work with SUM, AVERAGE, and pivot tables.
Use the -CodePage flag. -CodePage 65001 is UTF-8, 1252 is Western European, 1251 is Cyrillic, 932 is Shift-JIS. Set it to match the encoding declared in the source HTML and the cell content lands in the XLS without corruption.
Yes. Pass a URL as the source instead of a file path. The converter fetches the page, parses any tables, and writes them to XLS. This works from both the command line and the ActiveX interface, and it is the standard pattern for scraping public data into spreadsheets.
Yes. Total HTML Converter X registers as a COM/ActiveX object (HTMLConverter.HTMLConverterX). You can call it from .NET, PHP, Python, VBScript, ASP, Ruby, Perl, and any other COM-compatible environment to convert HTML to XLS on demand inside your own web app.
Yes. Pass -Sheet YourSheetName on the command line and the resulting workbook will use that name for its worksheet instead of the default. Useful when the XLS feeds a downstream system that looks for a specific sheet name.

 

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 • 159 MB

C++ sample
Power Basic sample
VBScript sample

Examples of Total HTML Converter X

Convert HTML files With .NET by TotalHTMLConverterX and .NET


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

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

MessageBox.Show("Convert complete!");

Download
.NET HTML Covnerter example
Server samples in C# specifically for ASP.net
Client application with WinForms in C#

Convert HTML & MHT Files On Web Servers With Total HTML Converter X

dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
C.Convert "c:\source.HTML", "c:\dest.JPG", "-cJPG -log c:\html.log"
C.Convert "https://www.coolutils.com/", "c:\URL Page.PDF", "-cPDF -log c:\html.log"
set C = nothing
Example2 ASP: directly stream the resulting PDF
dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
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.html", "C:\www\ASP", "-cpdf  -log c:\html.log")
set C = nothing

Convert HTML & MHT Files On Web Servers With Total HTML Converter X

Example PHP:
$src="C:\\test\\test.html";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("HTMLConverter.HTMLConverterX");
$c->convert($src,$dest, "-c pdf -log c:\\HTML.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

Convert HTML Files With Total HTML Converter X and Ruby

require 'win32ole'
c = WIN32OLE.new('HTMLConverter.HTMLConverterX')

src="C:\\test\\test.html";
dest="C:\\test\\test.tiff";

c.convert(src,dest, "-c TIFF -log c:\\test\\HTML.log");

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

Convert HTML files With Total HTML ConverterX and Python

import win32com.client
import os.path

c = win32com.client.Dispatch("HTMLConverter.HTMLConverterX")

src="C:\\test\\test.eml";
dest="C:\\test\\test.tiff";

c.convert(src, dest, "-c TIFF -log c:\\test\\HTML.log");

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

Convert HTML files With Pascal and Total HTML Converter X

uses Dialogs, Vcl.OleAuto;

var
  c: OleVariant;
begin
  c:=CreateOleObject('HTMLConverter.HTMLConverterX');
  C.Convert('c:\test\source.html', 'c:\test\dest.tiff', '-c TIFF -log c:\test\HTML.log');
  IF c.ErrorMessage<>'' Then
    ShowMessage(c.ErrorMessage);
end;

Convert HTML Files On Web Servers With Total HTML Converter X

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

Convert HTML files With Total HTML Converter X and Perl

use Win32::OLE;

my $src="C:\\test\\test.html";
my $dest="C:\\test\\test.tiff";

my $c = CreateObject Win32::OLE 'HTMLConverter.HTMLConverterX';
$c->convert($src,$dest, "-c TIFF  -log c:\\test\\HTML.log");
print $c->ErrorMessage if -e $dest;
If you need examples on other languages please contact us. We will create any example specially for you.

Support
Total HTML Converter X Preview1

Latest News

Newsletter Subscribe

No worries, we don't spam.


© 2026. All rights reserved. CoolUtils File Converters

Cards