Need help writing output to a file without <cr><lf> carriage contr

G

Guest

(and how antiquated is the term "carriage")

I'm trying to automate the creation of a shell script that will be run under
linux from excel VBA. The "dos" style of carriage control screws up proper
interpretation of the file on the linux system. It is easy enough to fix the
file before running it with sed or vim but I would like to be able to create
it correctly in the first place.

I tried opening the file as binary but and print strings like this:
print #fid "string" & chr(10)

I end up with a empty file!

If I open the file up as output I do create a file but I get the <rc><lf>
problem.

I'm sure this is simple and I'm missing something that will appear obvious
in hindsight, but right now I am stuck. Any help would be appreciated.
 
D

Dave D-C

Don said:
(and how antiquated is the term "carriage")
I'm trying to automate the creation of a shell script that will be run under
linux from excel VBA. The "dos" style of carriage control screws up proper
interpretation of the file on the linux system. It is easy enough to fix the
file before running it with sed or vim but I would like to be able to create
it correctly in the first place.
I tried opening the file as binary but and print strings like this:
print #fid "string" & chr(10)
I end up with a empty file!
If I open the file up as output I do create a file but I get the <rc><lf>
problem.
I'm sure this is simple and I'm missing something that will appear obvious
in hindsight, but right now I am stuck. Any help would be appreciated.

You want
Print #fid "string; chr$(10);

the ending ";" elimiates the crlf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top