Solved

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

Posted on 2007-03-27
1
393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 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