Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Hi ...read test file and copy it in a cell

Hi,

Can we copy a number/text from a text file which is in a specific
colomn and row in a text file and then paste it in the excel sheet. I
don't want to use the import command cuz my text file is not delimited.
There are number randomly placed in the text file which I need to copy
and paste it in the excel cells.

I want to place a button on my spreadsheet which would help the user to
locate the data file and then excel would extract data from that sheet
and paste it in the black spaces on the sheet.

Please Help !!!


Thanks,

Riggi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Hi ...read test file and copy it in a cell

i use something like this.
datapath stores the path to the file
the text file name is contained in the arr()
the first line of code imports the first line of the text file
the instr function looks for the word balance, check the instr help
then i set the correct worksheet to import the rest of the text file


Open DataPath & arr(z) For Input Access Read As #1
Line Input #1, WholeLine
If InStr(1, WholeLine, "Balance") Then
Set ws = Worksheets("Balance Raw Data")
End If

--


Gary


"Riggi" wrote in message
ups.com...
Hi,

Can we copy a number/text from a text file which is in a specific
colomn and row in a text file and then paste it in the excel sheet. I
don't want to use the import command cuz my text file is not delimited.
There are number randomly placed in the text file which I need to copy
and paste it in the excel cells.

I want to place a button on my spreadsheet which would help the user to
locate the data file and then excel would extract data from that sheet
and paste it in the black spaces on the sheet.

Please Help !!!


Thanks,

Riggi



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save copy of file to open as read only Ray Clark[_2_] Excel Discussion (Misc queries) 2 June 20th 08 12:19 AM
test do not read Tim[_48_] Excel Programming 7 October 29th 06 07:24 PM
Autoname a save as file from a cell in a read only file g4rod Excel Discussion (Misc queries) 2 October 6th 06 01:16 PM
Read through Range and copy Cell data to Array missleigh[_2_] Excel Programming 1 April 13th 06 12:00 AM
hpw do I logic test a cell then copy the row to diff. SS Debi Excel Worksheet Functions 4 October 5th 05 09:42 PM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"