Solved

import csv to excel macro

Posted on 2014-01-14
6
490 Views
Last Modified: 2014-01-25
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
Comment
Question by:cmatchett
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:gplana
ID: 39779835
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
 

Author Comment

by:cmatchett
ID: 39779883
The data would go into the spreadsheet in two continuous columns then?

I would like 4 columns

date, item1, date, item2
0
 
LVL 15

Expert Comment

by:gplana
ID: 39779905
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
LVL 17

Expert Comment

by:Gerald Connolly
ID: 39784809
Just import the whole file into one sheet and just extract the data you want into another using standard Excel cross sheet referencing.
0
 

Accepted Solution

by:
cmatchett earned 0 total points
ID: 39794036
I ended up using access.
0
 

Author Closing Comment

by:cmatchett
ID: 39808402
excel didn't get me the result i wanted
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question