open for append leaves additional characters.

Fuga

Registered User.
Local time
Today, 02:26
Joined
Feb 28, 2002
Messages
566
Hi,

I´m using the open for append method to write to a text file which is then converted to an xml file.

I loop through some lines in excel and for each line I´m writing it to the text file.

The problem is every string begins with " in the xml and ends with the return character. This means it doesn´t work as an xml file.

Does the write command leave these things or have I done something wrong?

Fuga.
 
Use PRINT instead of WRITE. PRINT won't encase strings in quotes.
 
Thanks!

I´ll try that. Do you think that will help with the return character as well?

Fuga.
 
Yes, I believe it does (but I've been known to OCCASIONALLY be wrong ) :D
 
PRINT verb is designed to print things to printers. The rule is generally that individual quotes get removed before the element is sent to the print buffer.

WRITE verb is designed to write things to files that won't necessarily be printed - but MIGHT be opened by Access later, or by another program. Think, if you will, about importing text files, where you have the option to specify that text fields will be enclosed in quotes. Then think about the quotes that enclose some fields as the result of a WRITE. Then try to decide how many coincidences you like in a single program.
 

Users who are viewing this thread

Back
Top Bottom