Markdown-preview-enhanced: Omit first row in csv file when using @import

Created on 26 Apr 2018  路  2Comments  路  Source: shd101wyy/markdown-preview-enhanced

I was wondering if there is a way to omit the first row of a csv file when using @import file.csv and outputting to HTML and/or Pandoc (parser does support this).

header1,header2 <---
data1,data1
data2,data2

Most helpful comment

It would be nice when importing CSV document that we could skip the first n lines of the dataset. I think this would work within the current framework:

@import "abc.csv" {skip=4}

it would also be nice to support the as option:

@import "abc.txt" {as="csv" skip=4}

All 2 comments

After some trial and error I discovered omitting anything in the header row except the commas omits the row when rendered via Pandoc. When rendered in HTML in the same manner, an empty row is shown. Attached is an example if anyone else is looking for the same functionality with this work around.

mpe-csv_example

It would be nice when importing CSV document that we could skip the first n lines of the dataset. I think this would work within the current framework:

@import "abc.csv" {skip=4}

it would also be nice to support the as option:

@import "abc.txt" {as="csv" skip=4}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

siriuscc picture siriuscc  路  3Comments

oneone1995 picture oneone1995  路  5Comments

ckdanny picture ckdanny  路  5Comments

franklin373 picture franklin373  路  4Comments

StefanoCecere picture StefanoCecere  路  5Comments