ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Read 500 columns of CSV data into a spreadsheet (https://www.excelbanter.com/excel-programming/330703-read-500-columns-csv-data-into-spreadsheet.html)

Bill Anderson

Read 500 columns of CSV data into a spreadsheet
 
I have a csv file
apx 500 fields in double quotes, separated by commas. Each "value" mwill
vary in length
There may be many rows of data like this in the file, each with the same
number of values
Blank values are represented by 2 double quotes
Example:
"Name","Address","Phone","Gender",etc.etc.etc. etc
"Mary","123 Any Street","555-1212","F"
"Bill","PO Box 1","","M"
"Darth","","",""

What I want to do is bring in each field from row 1 and put it in a
spreadsheet going down say 500 rows in column A.
Then move to the next data row and insert each of those fields into column B.
Like this:
"Mary"
"123 Any Street"
"555-1212"
"F"
etc etc etc etc

I know READLINE will read a whole line, but I haven't found a way to read a
"value".
Any ideas?


Mike Q.[_4_]

Read 500 columns of CSV data into a spreadsheet
 
Bill,

This is probably the hard way, but its something...

I copied column A and pasted onto Sheet2.
In Sheet2 I selected column A.
DateText to ColumnsDelimitedComma and then in step 3 of 3 I selected
column 1 and with my shift key I selected column 250 (hopfully you know what
the Header is for column 250) and put a bullet in "do not import column".
Finish
Next I copied the rows.
Paste specialTranspose
I did the same as above for Sheet1 except I did not import columns 251 thru
500.
Now just copy results from Sheet2 under Sheet1

Mike Q.




"Bill Anderson" wrote:

I have a csv file
apx 500 fields in double quotes, separated by commas. Each "value" mwill
vary in length
There may be many rows of data like this in the file, each with the same
number of values
Blank values are represented by 2 double quotes
Example:
"Name","Address","Phone","Gender",etc.etc.etc. etc
"Mary","123 Any Street","555-1212","F"
"Bill","PO Box 1","","M"
"Darth","","",""

What I want to do is bring in each field from row 1 and put it in a
spreadsheet going down say 500 rows in column A.
Then move to the next data row and insert each of those fields into column B.
Like this:
"Mary"
"123 Any Street"
"555-1212"
"F"
etc etc etc etc

I know READLINE will read a whole line, but I haven't found a way to read a
"value".
Any ideas?



All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com