jab43 has asked for the wisdom of the Perl Monks concerning the following question:
I am working on a project to load Excel data into a database. I am converting the Excel files into .csv files and using sqlldr to insert the data into the database.
I have just discovered that although an Excel file saves correctly as a .csv file, pertaining to one row per line, when I read the data line by line to add further columns for each line multiple line cells are wrapped in quotes but contain newlines. So as I read the file line by line it breaks apart this cell into new rows. I don't want that.
I haven't discovered a way to read line by line but ignore new lines within quotes. Or I am open to any other way to manipulate the data to add it to a database. Here's an example of a line from the csv:
MM01,aluminum,AMS-QQ-A250/11,Raiser,N/A,W6548,Distributor,MiTech,,"PO# +F63254PO#H54675PO#G87954"
So I basically need to find the true end of the line. Thanks!
|
|---|