Home Download Buy Blog Forum Support

Nightmare CSV-any suggestions using this awesome app?

Nightmare CSV-any suggestions using this awesome app?

Postby virtuallywarped on Mon Mar 26, 2012 11:07 pm

I am a new user/buyer of this fantastic app and I suck at excel formulas and I'm just learning scripting. I have a spreadsheet that has a few columns and I need to create a csv file that is formatted specifically so that I can import the data to an app.

The spreadsheet has 4 columns, and I need to concatenate the columns and then also add some " marks and ; marks, and then a couple of values that are not in the spreadsheet.

ColumnA=SomeName --> x.x
ColumnC=A description of my system in column A
ColumnD=a folder name

I need to take these columns and combine them to form a string like the one below, which doesn't have the data from Column C - that might be removed from my requirement as the vendor might not support the description field any longer. I don't have a column that has the "Type" value in it that you see in the string below, I was hoping that could be part of a formula, and then I don't have a column with the 123 number as well as that could change as that number is specific to a site, so I wanted that to be part of the formula.

Any suggestions on how to do this using sublime? It's got to be better than miserable excel :evil: :evil: :evil:

I have no " marks around any of the items in the spreadsheet, I figured it would be easy adding them with an excel formula, but I was wrong, and aside from that everything else is mentioned. Thank you all!

GeorgiaSite1 --> x.x.x;"Test.this.fails";"";"";"type";"0123";"Test-subfolder"
Posts: 5
Joined: Mon Mar 26, 2012 7:19 pm

Re: Nightmare CSV-any suggestions using this awesome app?

Postby SeanWcom on Tue Mar 27, 2012 2:06 am

Excel can be tricky, but that's probably the easier way to go. Using your data, I came up with this excel function:

Code: Select all
="GeorgiaSite1 --> "&A1&";"""&B1&""";"""";"""";""type"";""0123"";"""&D1&""""

That will output the exact string you have listed in your post: GeorgiaSite1 --> x.x.x;"Test.this.fails";"";"";"type";"0123";"Test-subfolder"

Is that what you're trying to do or am I misreading your question? :) As far as doing this in SublimeText... technically you could make it do just about anything with the right amount of Python knowledge - but given a set of data (in csv format), Excel really would be easiest.
Multiple selections... one of my favorite ST2 features. View some noob-friendly screen casts here.
Posts: 101
Joined: Wed Aug 03, 2011 1:31 am
Location: Georgia

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 15 guests