ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hi ...read text file and copy it in a specific cell (https://www.excelbanter.com/excel-programming/380217-hi-read-text-file-copy-specific-cell.html)

riggi

Hi ...read text file and copy it in a specific cell
 
Hello all,


Can we copy a number/text from a text file which is in a specific
colomn and row in a text file( which has a fixed format, say 10 spaces)
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


[email protected]

Hi ...read text file and copy it in a specific cell
 
Look into the Open statement in help.
Depending on how you intend to locate the string(s) in the text;

Dim FileNum as long
Filenum=freefile
Open Filename For Input As #FileNum
or
Open Filename For Binary As #FileNum
'etc

NickHK

Riggi wrote:
Hello all,


Can we copy a number/text from a text file which is in a specific
colomn and row in a text file( which has a fixed format, say 10 spaces)
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




All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com