Understanding Export Formats

Why Multiple Formats?

Different contexts require different table representations. A table embedded in a webpage needs HTML, while data analysis is best done in a spreadsheet program like Excel. Documentation often uses Markdown, and wikis have their own markup. Table Builder aims to provide flexibility for all these scenarios.

You can select your desired format from the "Format" dropdown in the export controls before clicking "Copy Code" or "Download".

HTML (HyperText Markup Language)

  • Description: Exports your table as standard HTML code, using `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, and `<td>` elements. Merged cells are represented using `colspan` and `rowspan` attributes.
  • Best for:
    • Embedding directly into websites and web pages.
    • Email newsletters that support HTML.
    • Any application that can render HTML content.
  • Styling:
    • Cell-specific styles (background color, text color, text alignment, font styles, individual borders) applied in Table Builder are exported as inline CSS styles on the `<td>` or `<th>` elements. This ensures they render as designed when you paste the code.
    • Global table styles (like default border width, style, color, cell padding) are also translated into inline styles on the relevant elements or the main `<table>` tag.
    • Both the "Download" option and "Copy Code" for HTML provide a full HTML document, including basic CSS to make the table display correctly. The primary difference is the delivery method (a downloaded file versus copied to your clipboard).
  • Pros: Offers the closest visual match to the styling applied in the preview. Universally supported by web browsers.
  • Cons: Inline styles can be verbose. For extensive site-wide consistency, you might later transfer these inline styles to an external CSS file and class your table accordingly.
  • Tip: For responsive behavior on your site, you'll often wrap the exported HTML table in a `
    ` and apply CSS like `overflow-x: auto;` to that wrapper.

XLSX (Microsoft Excel Open XML Spreadsheet)

  • Description: Exports your table as an `.xlsx` file, compatible with Microsoft Excel, Google Sheets, LibreOffice Calc, Apple Numbers, and other spreadsheet software.
  • Best for:
    • Data analysis and manipulation.
    • Sharing data with colleagues who use spreadsheet programs.
    • Performing calculations or creating charts based on the table data.
    • Archiving data in a structured format.
  • Styling:
    • Content and Structure: Cell content, merged cells (`colspan`/`rowspan`), row and column structure are preserved.
    • Basic Formatting: Some basic styling aspects like text content and cell merging are generally well-supported.
    • Advanced Visual Styling: Complex visual styling (specific border styles beyond simple lines, intricate color schemes, font effects beyond bold/italic) applied in Table Builder may not translate perfectly or completely to XLSX. Spreadsheet programs have their own styling engines. The primary focus of XLSX export is data integrity and structure.
    • Table Builder uses the SheetJS (js-xlsx) library for this conversion, which does a good job with data and basic formatting.
  • Pros: Excellent for data interchange and further analysis. Widely supported format.
  • Cons: Visual styling fidelity from Table Builder's preview will be limited by what spreadsheet software supports and how the XLSX conversion library handles it.
  • Note: This option is only available via the "Download" button.

Markdown

  • Description: Exports your table using plain text Markdown table syntax. This typically involves using pipes (`|`) to define columns and hyphens (`-`) to separate the header row.
  • Best for:
    • Documentation (e.g., `README.md` files on GitHub, GitLab).
    • Content Management Systems (CMS) or blogging platforms that support Markdown (e.g., Jekyll, Hugo, Ghost).
    • Note-taking applications that use Markdown.
    • Online forums or comment sections that support Markdown.
  • Styling:
    • Markdown itself has very limited native styling capabilities for tables. The exported Markdown will represent the structure and content, but not the visual styling (colors, specific borders, font styles beyond what Markdown renderers might apply by default to headers).
    • Standard Markdown table syntax has limited support for explicit text alignment (often indicated by colons in the separator row like `|:---|` or `|:---:|`). Currently, Table Builder's Markdown export focuses on structure and content, and does not automatically add these alignment indicators.
    • Merged cells (`colspan`/`rowspan`) are not directly supported by standard Markdown table syntax. Table Builder will export the content, but the cells will appear unmerged. You may need to manually adjust or use HTML within Markdown if your renderer supports it for complex structures.
  • Pros: Simple, plain text, easy to read and edit in any text editor. Highly portable.
  • Cons: Most visual styling is lost. No support for merged cells in standard Markdown.

MediaWiki (Wikitext)

  • Description: Exports your table using MediaWiki table syntax (also known as Wikitext or Wiki markup). This is the markup language used by Wikipedia and other wikis powered by MediaWiki software.
  • Best for:
    • Adding or editing tables on Wikipedia.
    • Contributing to company or community wikis built on MediaWiki.
  • Styling:
    • MediaWiki syntax supports some basic styling attributes for tables, cells, rows (e.g., `style="background:yellow;"`, `align="center"`).
    • Table Builder exports the structural elements of your table, including merged cells (`colspan` and `rowspan`), for MediaWiki. While MediaWiki syntax supports some styling attributes, the current export focuses on structure and content rather than converting visual CSS styles (like specific background colors or advanced text formatting) into MediaWiki styling attributes.
    • Complex border styles or very specific font treatments may not have direct equivalents and might be simplified if attempting manual styling in Wikitext.
    • Merged cells (`colspan` and `rowspan`) are supported by MediaWiki syntax and are exported correctly.
  • Pros: Native format for MediaWiki, integrates well. Supports merged cells. Retains some basic styling.
  • Cons: Specific to the MediaWiki platform. Styling capabilities are less extensive than HTML/CSS.

Choosing the Right Format

Consider these questions when selecting an export format:

  • Where will this table be used? (Webpage, spreadsheet, documentation, wiki?)
  • How important is preserving visual styling? (Critical for HTML, less so for Markdown/XLSX).
  • Do I need to further manipulate the data? (XLSX is best).
  • Are complex structures like merged cells required? (Supported well in HTML, MediaWiki, XLSX; not in standard Markdown).

Conclusion

Table Builder's multiple export formats provide the versatility needed to use your tables across a wide array of platforms and applications. Understanding the characteristics and limitations of each format will help you choose the best option for your specific needs.

For detailed information on styling your tables before export, please see our Advanced Styling Techniques Guide.

Back to Guides