cmatchett
asked on
import csv to excel macro
Hi,
I have a csv file that has been exported from a storage controller and the format is like this.
line1
line2
line3
line4
line5
date, item1
value, value
value, value
line7
line8
line9
line10
line11
date, item2
value, value
value, value
value, value
value, value
I would like to read the data after line 5 and 11 into a excel spreadsheet. Can it be done using a macro ?
so the fields i would have would be
date, item1, date, item2
I have a csv file that has been exported from a storage controller and the format is like this.
line1
line2
line3
line4
line5
date, item1
value, value
value, value
line7
line8
line9
line10
line11
date, item2
value, value
value, value
value, value
value, value
I would like to read the data after line 5 and 11 into a excel spreadsheet. Can it be done using a macro ?
so the fields i would have would be
date, item1, date, item2
ASKER
The data would go into the spreadsheet in two continuous columns then?
I would like 4 columns
date, item1, date, item2
I would like 4 columns
date, item1, date, item2
No, data will go on different rows.
However, once you have the pairs on different rows, you can manipulate the worksheet to combine two rows in one row.
However, once you have the pairs on different rows, you can manipulate the worksheet to combine two rows in one row.
Just import the whole file into one sheet and just extract the data you want into another using standard Excel cross sheet referencing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excel didn't get me the result i wanted
Then you can import the .csv as a text file, selecting the comma as the separator character.
Hope it helps.