ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to import Text file to Excel (https://www.excelbanter.com/excel-programming/289971-how-import-text-file-excel.html)

Sobhan

How to import Text file to Excel
 
Hi all,
Iam new to excel programming. What iam trying to do is to read
a .txt file in CSV format from a specific directory and import that to
excel after grep(Unix System() command) for certain keyword in the
..txt file.
Do anyone has done similar thing can give a clue?

Regards
Bubunia

Dave Peterson[_3_]

How to import Text file to Excel
 
If you've already gotten your .txt file, then record a macro when you import it
manually the first time.


Sobhan wrote:

Hi all,
Iam new to excel programming. What iam trying to do is to read
a .txt file in CSV format from a specific directory and import that to
excel after grep(Unix System() command) for certain keyword in the
.txt file.
Do anyone has done similar thing can give a clue?

Regards
Bubunia


--

Dave Peterson


Sobhan

How to import Text file to Excel
 
Dave Iam not clear what you are trying to explain. Would you mind
elaborating a little??
Iam using VC++.

Dave Peterson wrote in message ...
If you've already gotten your .txt file, then record a macro when you import it
manually the first time.


Sobhan wrote:

Hi all,
Iam new to excel programming. What iam trying to do is to read
a .txt file in CSV format from a specific directory and import that to
excel after grep(Unix System() command) for certain keyword in the
.txt file.
Do anyone has done similar thing can give a clue?

Regards
Bubunia


Tom Ogilvy

How to import Text file to Excel
 
Dave is saying you can see the vba code to import a csv file by recording a
macro while you do it manually (in Excel).

If you are using C++, this still might be useful in seeing what command to
use and the syntax/arguments for that command.

Other than that, you might want to build a safearray of your data and write
that to your worksheet. You might search the knowledge base on VC++,
Safearray and Excel.

http://support.microsoft.com
choose advanced search, product Excel for windows.

--
Regards,
Tom Ogivy

"Sobhan" wrote in message
om...
Dave Iam not clear what you are trying to explain. Would you mind
elaborating a little??
Iam using VC++.

Dave Peterson wrote in message

...
If you've already gotten your .txt file, then record a macro when you

import it
manually the first time.


Sobhan wrote:

Hi all,
Iam new to excel programming. What iam trying to do is to read
a .txt file in CSV format from a specific directory and import that to
excel after grep(Unix System() command) for certain keyword in the
.txt file.
Do anyone has done similar thing can give a clue?

Regards
Bubunia





All times are GMT +1. The time now is 05:37 PM.

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