J
Jarmo Hurri
Hi Excel gurus!
I've been trying to program a small Excel workbook that calls DOS
binaries written with C++ to do the actual computational work. With
the help of previous articles in this newsgroup, calling executables
and waiting for their execution to end now works perfectly.
However, I still have a minor problem in passing output to the
programs. What I need to do is to write a number of sheets, with
macros / VBA code, in different text files before running the
programs. This can be achieved by using the SaveAs macro as follows:
Worksheets(1).SaveAs FileName:="file1.txt", FileFormat:=xlTextMSDOS
However, the problem with this approach is that it somehow modifies
the current workbook by turning sheet 1 into file1.txt. This is not
what I want - I only want to export / write the data without modifying
the workbook.
I have found various awful-looking hacks in some newsgroups for doing
the exporting, but the articles I saw were fairly old. I would think
that by now there would be a more convenient way to achieve what I'm
trying to do. Is there one?
Thanks in advance for all your help.
I've been trying to program a small Excel workbook that calls DOS
binaries written with C++ to do the actual computational work. With
the help of previous articles in this newsgroup, calling executables
and waiting for their execution to end now works perfectly.
However, I still have a minor problem in passing output to the
programs. What I need to do is to write a number of sheets, with
macros / VBA code, in different text files before running the
programs. This can be achieved by using the SaveAs macro as follows:
Worksheets(1).SaveAs FileName:="file1.txt", FileFormat:=xlTextMSDOS
However, the problem with this approach is that it somehow modifies
the current workbook by turning sheet 1 into file1.txt. This is not
what I want - I only want to export / write the data without modifying
the workbook.
I have found various awful-looking hacks in some newsgroups for doing
the exporting, but the articles I saw were fairly old. I would think
that by now there would be a more convenient way to achieve what I'm
trying to do. Is there one?
Thanks in advance for all your help.
