Documentation
Embed Table

Embedding Table in an Iframe

This document explains how to embed your google sheet as a Table in your website.


<iframe src="https://sheet2db.com/table.html?id=<connection-id>" width="100%" height="600px"></iframe>

Parameters

title: Sets the document's title.

tableBg: Adds a Tailwind CSS class to style the table background.

headerBg: Adds a Tailwind CSS class to style the header background.

darkMode: When set to true, enables dark mode.

fontFamily: Sets the font family for the content inside the iframe.

id: The Sheet2DB ID of the data source.

limit: Limits the number of rows fetched from the data source.

offset: Sets the offset for the data fetching.

sheet: Specifies the sheet name within the data source.

sortColumns: Comma-separated list of column names to enable sorting. Columns with date values will be sorted as dates.

striped: When set to true, enables striped table rows with alternating background colors.

enableSearch: When set to true, adds a search box which allows filtering table rows based on input.

imageColumns: Comma-separated list of column names that should be treated as image URLs.

imageWidth: Sets the width of images in image columns (e.g., '100px').

imageHeight: Sets the height of images in image columns (e.g., '100px').

imageFit: Sets the object-fit property for images in image columns (e.g., 'cover', 'contain').

This setup allows you to dynamically control the appearance and behavior of the embedded table, making it flexible for different use cases and styling requirements. Adjust the parameters in the URL to fit your specific needs.