Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying data from text file to excel sheet
hi i want to copy data from text file to excel sheet for ex the data int the text file is 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 we have get this data into excel sheet like this A B C D E 1 1 0 1 0 1 2 0 1 0 1 0 3 1 0 1 0 1 4 5 So,Plz help me regarding this thanks sree -- sreedhar ------------------------------------------------------------------------ sreedhar's Profile: http://www.excelforum.com/member.php...o&userid=27582 View this thread: http://www.excelforum.com/showthread...hreadid=476716 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying data from text file to excel sheet
turn on the macro recorder and then do file=OPen and select your file. go
through the text import wizard and select delimited and space as the delimiter (or tab - whatever is appropriate). Then, when the file is in, turn off the macro recorder. This gives you the basic code you need. If you want it in an existing sheet, then just use additional code like Activesheet.UsedRange.copy Destination:= _ ThisWorkbook.worksheets(1).Range("A1") ActiveWorkbook.Close Savechanges:=False You can also modify the code to allow you to select a file by using fName = Application.GetOpenfileName then replacing the hard coded filename in the recorded code with fname -- Regards, Tom Ogilvy "sreedhar" wrote in message ... hi i want to copy data from text file to excel sheet for ex the data int the text file is 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 we have get this data into excel sheet like this A B C D E 1 1 0 1 0 1 2 0 1 0 1 0 3 1 0 1 0 1 4 5 So,Plz help me regarding this thanks sree -- sreedhar ------------------------------------------------------------------------ sreedhar's Profile: http://www.excelforum.com/member.php...o&userid=27582 View this thread: http://www.excelforum.com/showthread...hreadid=476716 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Split text file into Excel sheet and separate the final results intoa new sheet | Excel Worksheet Functions | |||
Copying only required string from txt file to excel sheet | Excel Discussion (Misc queries) | |||
Stop excel from copying data from one sheet to another | New Users to Excel | |||
Copying rows with spesified data on one or more columns from sheet/file to another? | Excel Programming |