#1 2011-10-26 15:56:59

delucinge
New member
Registered: 2011-10-26
Posts: 4

csv 'double' parsing

Hello,

I have a csv file with this format:
param1=value1;param2=value2;param3=value3.......


i would like to understand if there is any 'standard' way to parse this file and have an output with the following schema: param1/param2/param3/...

is it possible to use tjavaFlex to peform this parsing? can you share some samples?

With Regards;

David,

Offline

#2 2011-10-27 08:19:33

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

Re: csv 'double' parsing

Hi David,

Solving this problem could get very tricky. I've handled a similar file in the past.

If it's relatively easy depends mostly on the question if your rows are consistent in there structure. ie. doe each row contain a param1 in the first position, a param2 in the second position etc. and does it contain an empty "cell" when no value is given for a certain valueX.

If so, you could split the file using a tFileInputDelimited with ; as the separator and then split all fields with = as separator.

If not, you'll be facing another problem, but I hope for you this is not the case wink If it turns out to be, let me know and I can help you out with this as well.

Regards,
Arno

Offline

Board footer

Powered by FluxBB