View Single Post
  #9   Report Post  
Magius00
 
Posts: n/a
Default

Thanks for your help on this so far ron i think we're both on the right track
now.

here is a small sample of what i get:


01/04/2005 00:03 301 0.55 0.92 208782 345748 24
01/04/2005 00:08 301 1.32 0.91 496332 341729 47
01/04/2005 00:13 299 0.48 0.82 178567 305225 25
01/04/2005 00:18 300 0.55 0.72 204856 268616 24
01/04/2005 00:23 299 0.66 0.98 245143 367172 24

It's 5 min data the first column being a date/time the second being an
interval and then network stats.

This needs importing as is to get me.

01/02/2005 08:55 01-Feb-2005 08:55 08:00 3309
01/02/2005 09:55 01-Feb-2005 09:55 09:00 3596
01/02/2005 10:55 01-Feb-2005 10:55 10:00 3602
01/02/2005 11:59 01-Feb-2005 11:59 11:00 3887
01/02/2005 12:59 01-Feb-2005 12:59 12:00 3601


The macro i use is this:


Sub ImportNewSheet()

'Copys the table from the CSV to the eHealthGen workbook and closes the csv


Set rTable = refCell.CurrentRegion
Set NewSheet = Workbooks("ehealthgen1").Worksheets.Add
rTable.Copy (NewSheet.Range("a1"))


End Sub

The table is picked up by using a refcell and then current region and
setting this as rtable.

I then use the copy function to move the data into a workbook where another
macro does the formatting. If i could import all of these as the original
text i would be happy. Otherwise i will re-write my macro to open it as a
text file and delimit the file (already do this on some other work so not a
problem)

Thanks again
Mark