Excel to PDF

Upload an Excel file, preview worksheet data, then export it as a PDF.

Back to all tools on ToolForge

More in PDF & Export

Upload Excel File

Upload an Excel workbook and choose which sheet to export.

Worksheet:

Preview

About Excel to PDF

This Excel to PDF tool reads worksheet data in your browser, renders a table preview and exports it as a PDF. It works well for lightweight spreadsheets, reports and tabular exports.

Files stay on your device during conversion, making it suitable for quick frontend-only use.

Excel to PDF Conversion Process

  1. File Upload: User selects .xlsx, .xls, or .csv file
  2. Binary Parsing: SheetJS reads file as ArrayBuffer and parses workbook structure
  3. Sheet Selection: User chooses which worksheet to export
  4. Data Extraction: Worksheet converted to JSON array using sheet_to_json()
  5. HTML Rendering: Data rendered as styled HTML table
  6. Capture: html2canvas captures table as PNG image
  7. PDF Generation: jsPDF embeds image in A4 landscape PDF

SheetJS Implementation

// Load Excel file
function loadWorkbook() {
  const file = document.getElementById("excel-file").files[0];
  const reader = new FileReader();

  reader.onload = function(e) {
    const data = new Uint8Array(e.target.result);
    const workbook = XLSX.read(data, { type: "array" });

    // Get sheet names
    workbook.SheetNames.forEach(name => {
      const sheet = workbook.Sheets[name];
      const rows = XLSX.utils.sheet_to_json(sheet, { header: 1 });
      // rows is now a 2D array [[cell1, cell2], [cell3, cell4]]
    });
  };

  reader.readAsArrayBuffer(file);
}

Supported File Formats

FormatExtensionDescription
Excel 2007+.xlsxOffice Open XML (recommended)
Excel 97-2003.xlsBIFF8 binary format
CSV.csvComma-separated values
Excel Macro.xlsmMacro-enabled workbook
Excel Binary.xlsbBinary workbook format

Excel vs PDF Comparison

FeatureExcelPDF
EditingFull editing supportRead-only (typically)
FormulasLive calculationsStatic values only
FormattingCell styles, conditionalFixed layout
PortabilityRequires spreadsheet appUniversal viewer support
Print ReadySetup requiredAlways print-ready
File SizeLarger with dataCompressed, optimized

Frequently Asked Questions

How does Excel to PDF conversion work in the browser?
The tool uses SheetJS (xlsx) library to parse Excel binary data in the browser. It reads .xlsx files into JSON format, renders the data as an HTML table, then uses html2canvas to capture the table as an image and jsPDF to embed it in a PDF document. All processing happens client-side without server upload.
What Excel file formats are supported?
Supported formats include: .xlsx (Excel 2007+, Office Open XML), .xls (Excel 97-2003, BIFF8), and .csv (Comma-Separated Values). The .xlsx format is recommended for full feature support including multiple worksheets, formatting, and formulas. CSV files are treated as single-sheet data.
What is the difference between XLSX and XLS formats?
XLSX (Office Open XML) uses XML-based compressed storage, supports larger spreadsheets (1M+ rows), and has better data recovery. XLS (BIFF8) is Microsoft's proprietary binary format with 65K row limits. XLSX files are smaller and more compatible with modern tools.
How are multiple worksheets handled?
The tool reads all worksheet names from the workbook and displays them in a dropdown selector. Users can choose which sheet to render and export. Each sheet is processed independently. To export multiple sheets, convert each sheet separately or use a tool that supports multi-sheet PDF generation.
What are the limitations of browser-based Excel conversion?
Limitations include: complex formatting may not render exactly, charts and images may not display, formulas are evaluated as static values, pivot tables become plain data, and macros/VBA are not executed. For complex spreadsheets, desktop Excel or server-side conversion is recommended.
What is SheetJS and how does it work?
SheetJS (xlsx) is a JavaScript library that parses and writes spreadsheet data. It reads binary file data, parses the Office Open XML structure, extracts worksheet data into JSON arrays, and can write data back to spreadsheet format. It's widely used for client-side spreadsheet processing.