Sublime Forum

Csv

#1

I made a simple CSV plugin called CSV on Will Bond’s package control and available on github here: github.com/ericmartel/Sublime-Text-2-CSV-Plugin

So far it allows you to fix the first row if desired as header, sort your data (sort is string based, so 11 will appear before 2, for example) but I think most interestingly to format it with an arbitrary string… for example you could format your data using something like: {0} - {2} for some data where the column 0 is the index, 1 is the url and 2 is the name.

I’ll be working on a page to describe the example with actual data but in the mean time I’m open for feedback :smile:

I think allowing the possibility to assign types to columns for the sort would be good, but I’ll only do it if people are interested in the plugin

Cheers

Eric

0 Likes

#2

Hi Eric,

I like your plugin idea! Unfortunately it is not working for my test case. Any command results in “csv: The buffer doesn’t appear to be a CSV file”. I think the plugin assumes the delimiter to be ‘,’ but my test uses ‘;’ (which is valid as far as i know). Furthermore, each data column is placed into double quotes, and can contain ‘,’ or ‘;’. Here is a simple example (including a header):

col1;col2;col3
“1”;“2,1”;“3”
“4”;“5;2”;“6”

Greetings, Thorsten.

0 Likes

#3

Hi,

I have to spend the day at the hospital but I’ll add features to support that later tonight!

Thanks for the feedback :smile:

Edit: things didn’t go as planned, tomorrow most likely

0 Likes

#4

The plug in should now be working with the data you provided!

0 Likes

#5

Hi Eric,

many thanks for working it over!

0 Likes