Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Data Import Question
I need to import data into Excel for statistical analysis. The data is being
collected from thousands of PC's in an organization. Each of them generates a "log" file and places it on a server. Each file is a text file, tab delimited with a header row, and a data row. Each file imports perfectly into Excel. What I would like to do, is concatenate the files into one file, then import the entire file. I am able to do this by doing: "copy *.log concatenated.txt" and it creates one file which imports fine. The problem is that in this concatenated file, every other line is a repeat of the column headers. Is there an easy way in Excel to import that file and recognize every other line as headers and reject them? I am using Excel 2007. Thanks, Steve |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Data Import Question
Insert a temporary column to the left (ie Col A)and number the rows 1,2,3....
Sort with Col B so that headers will be together and then delete header rows Sort them with ColA ie the sequence number.. Delete the temporary Col A If this post helps click Yes --------------- Jacob Skaria "Steve Haack" wrote: I need to import data into Excel for statistical analysis. The data is being collected from thousands of PC's in an organization. Each of them generates a "log" file and places it on a server. Each file is a text file, tab delimited with a header row, and a data row. Each file imports perfectly into Excel. What I would like to do, is concatenate the files into one file, then import the entire file. I am able to do this by doing: "copy *.log concatenated.txt" and it creates one file which imports fine. The problem is that in this concatenated file, every other line is a repeat of the column headers. Is there an easy way in Excel to import that file and recognize every other line as headers and reject them? I am using Excel 2007. Thanks, Steve |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Data Import Question
You can use a helper column.
Enter 1 and 2 in top two cells. Select both then right-click and drag down. Release and "Copy Cells" Autofilter for 1 and delete those visible cells found by the filter. Or use a macro. Sub delete_even_rows() Dim r As Long Dim rng As Range Dim numLoops As Long ActiveSheet.Rows("1:1").EntireRow.Insert Set rng = Range(Cells(1), Cells(Rows.Count, ActiveCell.Column).End(xlUp)) numLoops = Int((rng.Rows.Count / 2)) For r = 1 To numLoops rng(r + 1, 1).EntireRow.Delete Next End Sub Gord Dibben MS Excel MVP On Wed, 20 May 2009 11:00:01 -0700, Steve Haack wrote: I need to import data into Excel for statistical analysis. The data is being collected from thousands of PC's in an organization. Each of them generates a "log" file and places it on a server. Each file is a text file, tab delimited with a header row, and a data row. Each file imports perfectly into Excel. What I would like to do, is concatenate the files into one file, then import the entire file. I am able to do this by doing: "copy *.log concatenated.txt" and it creates one file which imports fine. The problem is that in this concatenated file, every other line is a repeat of the column headers. Is there an easy way in Excel to import that file and recognize every other line as headers and reject them? I am using Excel 2007. Thanks, Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
import XML data...Is there a size limit on the import? | Excel Discussion (Misc queries) | |||
import question | Excel Discussion (Misc queries) | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
Excel 2007 Import data question | Setting up and Configuration of Excel | |||
Import Question | Excel Discussion (Misc queries) |