Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

metalsmith-excel-markdown

This metalsmith plugin allows you to query excel files using AlaSQL and then convert them into Markdown tables using markdown-tables.

##Usage

var exlmd = require('metalsmith-excel-markdown');
Metalsmith(__dirname)
  .destination('./build')
  .use(exlmd(config({folder: "path/to/excel_files"}))
  .build(function(err) {
    if (err) { throw err; }
  });

Example Source File

---
table: 'people.xlsx'
select: 'First_Name, Age, Email'
additional: 'WHERE First_Name = "Patrick" ORDER BY Age ASC
---
#This table shows users first names, their age, and their email.

<TABLE WILL BE APPENDED AT THE BOTTOM OF THE FILE>

##General Info

It works by scanning files for 'table', 'select', and/or 'additional' attributes.

  • table corresponds to the Excel file to query
  • select lets you add select statements
    • If no select statement is specified, the default statement is '*'
  • additional lets you add other SQL statements such as WHERE and ORDER BY
    • If no additional attribute is specified then it is ignored

###Config A config option ('folder') can also be passed to specify the location of your excel files. By default this is set to 'xlsx/'

###Examples See the example src files for more examples on how to format the original markdown files. There is also an example repo you can clone here

About

Metalsmith plugin to query excel files with Alasql and convert to markdown

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.