How to manipulate data and import to a database

I am trying to convert a list of data into a database
My text after being converted back from a pdf image is no longer in
columns and grouped as so: FIRST_NAME LAST_NAME unique_identification#
dob(y-m-d) gender date_of_visit(y-m-d) billing_code(combination of
uppercase letters and numbers) procedure_performed(capitalized with
spaces between each word with a few upcase words) billed_amount(eg 35.20
or 123.40) nextFIRST_NAME LAST_NAME … and goes on and on for a
couple of thousand records.

I would like them all to be put into a spreadsheet like excel. How
should i divide up the data.
I’m thinking Assign classes but what are some conditionals that would
help me define the classes like first name, last name, billingcode… Am
i over thinking this? Is there an easier way to manipulate the data?

I’m in over my head and need a rubyist to set me on the right track on
how to manipulate & organize & import to excel.

Some examples would help. If you’re talking about a text file that you
want to convert to CSV or TSV, then you could probably do a #gsub with a
suitable Regexp pattern to put your delimiters in place, then Excel will
happily import the data.

In fact, you don’t even need Ruby for something like that. Notepad++ can
do Regexp find & replace in text files for you.