A Twig function to convert Spreadsheets into HTML tables
Switch branches/tags
Nothing to show
Clone or download
Latest commit a867709 Dec 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add icon Nov 16, 2018
.gitignore Update .gitignore Nov 15, 2018
CHANGELOG.md Finish 1.0.0 Nov 16, 2018
LICENSE Update LICENSE Nov 15, 2018
README.md Add icon to README Dec 14, 2018
composer.json Finish 1.0.0 Nov 16, 2018

README.md

Sheets to Tables icon

Sheets to Tables

This Craft CMS plugin adds a Twig function to convert Spreadsheets into HTML tables.

Requirements

This plugin requires Craft CMS 3.0 or later.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Sheets to Tables”. Then click on the “Install” button in its modal window.

Using Composer

Open your terminal and run the following commands:

# go to the project directory
cd /path/to/project

# tell composer to use the plugin
composer require miranj/craft-sheets-to-tables

# tell Craft to install the plugin
./craft install/plugin sheets-to-tables

Usage

To convert a spreadsheet file into an HTML <table>, pass an craft\elements\Asset object as an argument to the sheetstotables( asset ) Twig function.

{% set spreadsheet = craft.assets.kind('excel').one() %}

{{ sheetstotables(spreadsheet) }}

If the spreadsheet file contains multiple sheets, only the contents of the first sheet will be rendered as a table.

Supported file formats


Brought to you by Miranj