Link to home
Start Free TrialLog in
Avatar of Manuel Lopez-Michelone
Manuel Lopez-MicheloneFlag for Mexico

asked on

comma delimited problem...

Hi guys,

I have a very simple problem... I have a listbox with many items on it. Each item is a comma delimited string (originally from a excel file), for instance:


FIDE,,ABURTO MUÑOZ HORACIO,1847,DF,,,,
,,ACEVEDO BENITEZ ERIC CESAR,1507,DGO,,,,
,,ACEVEDO GONZALEZ JUAN MANUEL,1394,EDM,,,,
FIDE,,ACEVEDO HILDA,2070,DF,,,,
,,ACEVEDO MANSUR ADRIAN,1442,DF,,,,
FIDE,MF,ACEVEDO MILAN ARMANDO,2235,DF,,,,
,,ACEVEDO MONTELONGO JUAN JOSE,1504,NL,,,,
,,ACEVEDO VELA EDGAR,1298,GTO,,,,


I need to separate the comma delimited string and send them to an array of strings, for instance:

FIDE,MF,ACEVEDO MILAN ARMANDO,2235,DF,,,,

should give me:

  Field[1] := 'FIDE'
  Field[2] := 'MF'
  Field[3] := 'ACEVEDO MILAN ARMANDO'
  Field[4] := '2235'
  Field[5] := 'DF'

and

,,ACEVEDO VELA EDGAR,1298,GTO,,,,

should give me:

  Field[1] := ''
  Field[2] := ''
  Field[3] := 'ACEVEDO VEGA EDGAR'
  Field[4] := '1298'
  Field[5] := 'GTO'

I know this is not a big task, but I have some other stuff to solve and I am asking for your help. I need a procedure to change the listbox item to the array of 5 fields... Any takers?

best wishes
Manuel Lopez (lopem)


ASKER CERTIFIED SOLUTION
Avatar of mokule
mokule
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Manuel Lopez-Michelone

ASKER

Great! thanks Mokule.
best regards
Manuel Lopez (lopem)