Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default Need help writing output to a file without <cr<lf carriage contr

(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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Need help writing output to a file without <cr<lf carriage contr

Don wrote:
(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

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default Need help writing output to a file without <cr<lf carriage c

That is obcure! Thanks. I actually found a different approach that works
using filesystemobect and textstream (documented here
http://book.itzero.com/read/others/C...l/LiB0041.html)

"Dave D-C" wrote:

Don wrote:
(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

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

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
Writing output to a textbox while VBA macro is running Chip Pearson Excel Programming 0 January 6th 07 12:40 AM
Tough One - Return output from Dos Process without writing to file Andibevan[_4_] Excel Programming 6 September 30th 05 10:10 AM
Carriage Return from HTML file Edo Excel Programming 2 August 5th 05 09:35 AM
Can I control linked cell property value in a copied ActiveX contr Beechbeard Excel Discussion (Misc queries) 0 May 4th 05 10:30 PM
Writing an Excel Spreadsheet via a program's output Blake[_2_] Excel Programming 3 August 27th 03 11:20 AM


All times are GMT +1. The time now is 01:35 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"