Solved

VB.Net 2005 - Trying to use Fixed Column Length variables???

Posted on 2007-03-27
1
387 Views
Last Modified: 2012-06-21
I need to create an output text file with fixed length columns. I'm not sure how to do that in VB.Net 2005. I'm thinking that I could write a routine where I pass the variable, the length the column needs to be, the data type (string or number), and then somehow return a variable with a padded value.

Anyone have any ideas on how to do this easier....I'm all ears!!!!

Thanks,
Blake
0
Comment
Question by:BlakeMcKenna
1 Comment
 
LVL 6

Accepted Solution

by:
CodeFish earned 500 total points
ID: 18801063
use the PadLeft/PadRight method of string:

Dim pString as String = "ABC"
pString = pString.PadRight(12)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now