How to left or right justifying a text file

50 pts.
Tags:
SQL
text files
VB.NET
Hello programmers. I am using sql to create a table from stored procedures and then streamwriter in vb.net to create a text file based on the sql table. Where and how do I control the right or left justification of the records in the text file? Thx.

 

ip



Software/Hardware used:
sql server 7, windows xp, visual studio 2005

Answer Wiki

Thanks. We'll let you know when a new response is added.

1.
There is no such thing as justification in plain text.

2.
Using RTF (rich text) you might get the results you need. You might just find a standard 80 col width text file is easier to write to and create functions to align the text but if you want to use RTF then the syntax would be:
Alignment
\qc Centered.
\qj Justified.
\ql Left-aligned (the default).
\qr Right-aligned.
\qd Distributed.

more information about rtf can be found here:<a href=”http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx”>

Note this is Microsoft RTF 1.6 and you might want to look into a more platform independent version of this solution.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following