Excel To Custom Template

Login

Email
Password

Don't have an account yet?

Go to Sign up

{{ workbook ? 'Online Table Editor' : 'Input Data' }}
Change File Enter Data
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert Excel to Custom Template — define your output format.
Built-in Template:
Row Template, Syntax ->
Header Template:
Footer Template:
Magic Syntax:
SyntaxDescription
{h1} {h2}1st, 2th... heading field
{$1} {$2}1st, 2th... row field
{F,} {F;}Split row by delimiter
{NR}Row number from 1
{ENR}End line number
{x code}Execute JS code
{...\}Literal braces
Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is Excel to Custom Template Converter?

Excel to Custom Template is a free online tool that converts Excel spreadsheet data (.xlsx, .xls, .xlsm) into any user-defined text format. Instead of exporting to a fixed format like CSV or JSON, you define the exact output structure using a flexible template syntax. The tool processes everything in your browser — your files are never uploaded to any server.  

This is useful for developers who need to generate SQL INSERT statements, configuration files, code snippets, HTML tables, or any structured text from tabular data. It is also valuable for non-technical users who want to reformat spreadsheet content for emails, reports, or data import into other systems.  

Core Features

  • Flexible Template Engine — Define header, row, and footer templates using {$1}, {$2} placeholders for column values and {h1}, {h2} for header names. Add row numbering with {NR}, or execute inline JavaScript with {x code}.

  • Online Table Editor — After uploading your Excel file, edit cells, add or delete rows and columns, transpose data, remove duplicates, apply case transformations, and find-and-replace — all before converting.

  • Built-in Templates — Choose from preset templates for common formats to get started quickly, or write your own from scratch.

  • Multi-Sheet Support — Select which sheet to work with when your workbook contains multiple sheets.

  • 100% Client-Side Processing — Files are parsed and converted entirely in your browser. No data is transmitted to any server, ensuring privacy and security.

  • Undo/Redo Support — Full edit history with undo and redo for safe data manipulation.

How to Use Excel to Custom Template Converter?

Step 1: Upload or Enter Your Data

Drag and drop an Excel file (.xlsx, .xls, or .xlsm) onto the upload area, or click to browse. Alternatively, click the Enter Data button to type or paste tabular data directly into the editor.  

Step 2: Edit Your Data (Optional)

Once loaded, your data appears in an editable table. Use the toolbar to:  

  • Add or delete rows and columns

  • Transpose rows to columns

  • Remove empty rows/columns or duplicate rows

  • Change text case (UPPERCASE, lowercase, Capitalize)

  • Find and replace values across all cells

  • Toggle "First Row as Header" to treat the first row as column names

Step 3: Define Your Template

In the Properties panel on the right, configure your output format:  

  • Built-in Template — Select a preset template for quick formatting.

  • Row Template — The main template applied to each data row. Use {$1} for the first column, {$2} for the second, and so on.

  • Header Template — Optional. Rendered once before all rows. Use {h1}, {h2} for column header names.

  • Footer Template — Optional. Rendered once after all rows. Use {ENR} for the total row count.

Template Syntax Reference

SyntaxDescriptionExample
{$1} {$2} ... {$N}Nth column value in the current rowINSERT INTO t VALUES('{$1}', '{$2}');
{h1} {h2} ... {hN}Nth column header name{h1}, {h2}, {h3}
{NR}Current row number (starting from 1)Row {NR}: {$1}
{ENR}End line number (total data rows)Total: {ENR} records
{F,} {F;}Split a row field by a delimiter{$1{F,}} splits comma-separated values
{x code}Execute inline JavaScript{x $1 * 2} doubles the first column value
{...\}Output literal braces{...\}{

Step 4: Convert and Export

Click Convert to generate the output. The result appears in the Output Data panel. Click Copy to Clipboard to copy it, or use Download File (Premium) to save it locally. Click Restart to reset all data and start over.  

Common Use Cases

  • SQL Generation — Convert spreadsheet data into INSERT, UPDATE, or DELETE statements for database seeding.

  • Code Generation — Transform tabular specs into enum definitions, API response mocks, or configuration files.

  • HTML/XML Generation — Create HTML table rows, XML nodes, or SVG elements from structured data.

  • Email Merge — Format rows into personalized email templates or mailing list entries.

  • Data Migration — Reformat Excel data for import into CMS platforms, CRMs, or ERP systems.

Frequently Asked Questions (FAQ)

  • Is my Excel data uploaded to a server?

    No. All file parsing and conversion happens entirely in your browser using client-side JavaScript. Your files are never uploaded, transferred, or stored on any server. This tool works even if you disconnect from the internet after the page loads.

  • What Excel file formats are supported?

    The tool supports .xlsx (Excel 2007+), .xls (Excel 97-2003), and .xlsm (macro-enabled) files. Multi-sheet workbooks are supported — you can select which sheet to convert.

  • Can I edit the data before converting?

    Yes. After uploading your file, the built-in table editor lets you modify cell values, add or remove rows and columns, transpose data, remove duplicates and empty rows, change text case, and find-and-replace — all before applying the template.

  • How do I reference column values in my template?

    Use {$1} for the first column, {$2} for the second, and so on. For column header names, use {h1}, {h2}, etc. The row number can be inserted with {NR}.

  • Is there a limit on the file size or number of rows?

    Since processing is entirely client-side, the practical limit depends on your device's available memory. Most modern browsers handle files with tens of thousands of rows without issue. For very large files (100,000+ rows), performance may vary by device.

  • What does the {x code} syntax do?

    The {x code} syntax lets you embed inline JavaScript expressions. The code is evaluated for each row, and you can reference column values using $1, $2, etc. within the expression. For example, {x $1 * 100} multiplies the first column value by 100.

  • Can I use this tool without uploading a file?

    Yes. Click the Enter Data button to open a blank editor where you can type or paste data manually, then apply your template as usual.

  • What is the difference between this tool and Excel's built-in export?

    Excel's built-in export saves to fixed formats (CSV, PDF, etc.). This tool lets you define any custom output format using a template syntax — including SQL statements, code snippets, HTML, XML, Markdown, or any text-based structure. It also provides a built-in editor for cleaning and transforming your data before export.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.