|
-
March 9th, 2010, 04:51 PM
#1
How to left or right justifying a text file
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? Should I export to text directly from sql instead of passing the table information through VB.Net streamwriter? Thx.
km
-
March 9th, 2010, 07:24 PM
#2
Well it's going to be viewed in some text reader and that's where the formatting would be done I think. I don't think there's any other way to format a text file. It will obey the settings in the text reader
There is nothing to fear, but life itself.
-
March 10th, 2010, 03:10 AM
#3
If you are going to generate a text file with a .txt extension, the simple way to format it is to use your own code to place the text where you want it on each line, with spaces as needed. If the file is opened with Notepad, the default font is Courier, a fixed width font with all characters taking up the same amount of space, which will allow columns to line up easily. If you are putting the text into an HTML web page, use the Courier font or another fixed width font if you want to keep it simple.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|