View Single Post
  #2   Report Post  
Old April 20th 05, 04:19 PM
Dave O
 
Posts: n/a
Default

There may be a method using the Excel user interface to do this- but if
you're able to write Perl script, you may be able to write a similar
VBA script within Excel to
~ read the CSV file to import it
~ during such import process, evaluate the first item on each row and
segregate the information into separate tabs
~ perform any text-to-numeric or numeric-to-text conversions as needed
~ maintain ultimate control over treatment of data (UK dates,
significant digits within a time stamp, etc.)

Are you familiar with VBA? The code for this would look something like
Sub CSVImport()
dim Lyne as string 'variable to hold entire line of data from csv
'declare other variables here
Open "c:\filename.csv" for input as #1
do while not eof(1)
line input #1, Lyne
'much data parsing he pick out data between commas, assign to
variables
'Write to relevant tab in the workbook, depending on the first
value in each row
loop
close #1
end sub

Depending on other responses here, this may be a viable option for you,
albeit somewhat painstaking up front.