Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
| Syntax | Description |
|---|---|
{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 |
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.
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.
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.
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
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.
| Syntax | Description | Example |
|---|---|---|
{$1} {$2} ... {$N} | Nth column value in the current row | INSERT 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 | {...\} → { |
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.
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.
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.
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.
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.
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}.
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.
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.
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.
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.