Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How can I insert a new line marker in between "Text1" and "Text2"?
unknown_user3
How can I insert a new line marker in between "Text1" and "Text2"?File f = File.OpenStream( file_name, File.AppendMode)File.WriteValue( f, "Text 1")File.WriteValue( f, "Text2")
Find more posts tagged with
Comments
eLink User
Message from via eLinkHi,> How can I insert a new line marker in between "Text1" and "Text2"?> > File f = File.OpenStream( file_name, File.AppendMode)> File.WriteValue( f, "Text 1")> File.WriteValue( f, "Text2") You could try with Str.LF and Str.CRLF, as in:String sText = "Text1" + Str.LF + "Text2"File.WriteValue( f, sText)I am using Str.LF in my Livelink 9.2/Windows installation, becauseStr.CRLF is returning "\r\r\n" instead of "\r\n" and I've been too lazyto investigate the cause. The constant Str.LF returns "\r\n" in myinstallation.Hope this helps, CurroThis email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.
unknown_user3
but its not writing 2 text in different lines? result is as follows:Text1\nText2
eLink User
Message from via eLink> but its not writing 2 text in different lines? result is as follows:> > Text1\nText2Not sure why that might happen. It might be related to the use ofFile.OpenStream() instead of File.Open() and File.WriteValue() insteadof File.Write(), but I do not really know. If there is no reason forusing OpenStream, I would have used:File f = File.Open( file_name, File.AppendMode )String sText = "Text1" + Str.LF + "Text2"File.Write( f, sText )Good luck, CurroThis email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.
unknown_user3
its working now. Thanks.