Search : in
By :

Macro that takes multiple csv files and puts

Last answer on Jun 29, 2009 5:33:26 am BST sacklin, on Jul 9, 2008 12:53:32 pm BST 
 Report this message to moderators

Hello,
I need a macro that takes multiple csv files and puts them all in 1 worksheet.
The csv files all have header info that i do not want copied into the worksheet
This information is contained in row 1-24.
The purpose of the worksheet is to compile information of different test results from different testers.
I am new to this, and any help would be apreciated.

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « macro that takes multiple csv files and puts » in :
Assembling multiple PDF files Show Assembling multiple PDF files Intro Steps: Intro PDF creator is a software allowing you to print several files into one with its printer function. Download link http://en.kioskea.net/telecharger/telecharger-40-pdf...
PYTHON – Read and Write CSV files ShowPYTHON – Read and Write CSV files Prerequisite Writing a CSV file Reading a CSV file Python Www.python.org, version 2.4 supports the de facto CSV format (comma-separated values: Comma Separated Values). The Reference Library...
Import CSV: bad alignment of dates ShowImport CSV: bad alignment of dates When opening a CSV file with Excel containing a column of dates and they are not well aligned. It may be that your problem is more serious than you think. Take one example in the following CSV file:...
Renaming multiple files in batch ShowRenaming multiple files in batch Native features Using a third-party program Renaming a large number of files can quickly become tedious. Fortunately, there are tools to automate this task in many cases: Native features On Windows...
Download LC ISO Creator ShowLC ISO Creator is very simple: it allows to create a .ISO file from your CD. Then, it allows you to burn these ISO files, to use CD emulation software (in order not to use any more the original CD) or to make a backup copy. The software is...
UNIX - Files ShowIntroduction to UNIX files In UNIX systems any element is represented in the form of a file. All files are architectured around a single tree structure where the base, called the root, is written "/". File types UNIX systems define different...

1

Fred, on Jan 28, 2009 4:24:47 pm GMT
  • +8

Give this a try!

' ************************************************************­********************
Sub test2()
Sheets("WS To be Loaded into").Select ' Where to load csvs
load_csv 65, "A988", "A1:D2", "\first.csv" 'A998 is destination cell, A1:D2 is CSV Range to copy
load_csv 66, "A993", "A1:C3", "\second.csv"
End Sub
' ********************************************************************************


' ********************************************************************************
Sub load_csv(counter, toRange, fromRange, csvName)
' Range(toRange).Activate
Range(toRange).Select
Workbooks.Open Filename:=ActiveWorkbook.Path & csvName
'Range(fromRange).Activate
Range(fromRange).Select
Selection.Copy
ActiveWindow.ActivateNext
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ActivateNext
Application.CutCopyMode = False
ActiveWindow.Close
End Sub
' ********************************************************************************

Reply to Fred

2

 priya, on Jun 29, 2009 5:33:26 am BST

Hello,

I want help in Excel macro,I have a excel file which is not in good format.I want to calculate a time according to condition below like, if i raised some ticket(regarding work) which has unique ticket number in one column A1 and in B1 cell i have following information, like the name of the person who has first taken that ticket on his account, then after uncertain space it has information like Assisgned/WIP/closed(status) then space and then time(assignment time) then some more information. But, it can be possible that one ticket number can be assigned and make WIP around 5 to 6 times.

I want my macro to calculate the total time starting from the first WIP status till the last.I am trying to make it in two ways.
1) My macro either should read the text WIP in cell B1 and take the just next text(which is time) after the status WIP.But i am unable to do like this.Since,the space between WIP and date is not fixed.

Second approach

2)I can first copy the source file in text file and from there i can write macro to break the text into column and copy the text file into my destination excel and from there i can write macro to calculate the ticket status,Since,in this way i can get the data in row and column wise and then i can calculate the time.

kindly help me.It is really very important for me.It will be a great help if somebody can help me.

Reply to priya