• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 525
  • Last Modified:

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
0
cmatchett
Asked:
cmatchett
  • 3
  • 2
1 Solution
 
gplanaCommented:
Why don't just edit the .csv on a text editor (like notepad) and remove these lines?
Then you can import the .csv as a text file, selecting the comma as the separator character.

Hope it helps.
0
 
cmatchettAuthor Commented:
The data would go into the spreadsheet in two continuous columns then?

I would like 4 columns

date, item1, date, item2
0
 
gplanaCommented:
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.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Gerald ConnollyCommented:
Just import the whole file into one sheet and just extract the data you want into another using standard Excel cross sheet referencing.
0
 
cmatchettAuthor Commented:
I ended up using access.
0
 
cmatchettAuthor Commented:
excel didn't get me the result i wanted
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now