Show Bid Request
Function to output formatted columns for fixed width fonts
Bid Request Id: 30540
|
|
|
Description:
I need a VERY efficient VB 6.0 function that takes an array or comma-delimited text, adds spaces to each column so the columns line up with fixed width font and outputs it as a string with VBCrLf at the end of each line. At times I may have as many as 20 columns and 200 rows. I also would like to optionally give the function a "screen width" limit so that it will truncate if it goes over, and only the column I specify. I would like to specify a header "underline" character and how many spaces should be between each column. Everything can be left justified. The first line would contain the headers. See below.
Function input would be something like:
InputString = "Person's Name,Age,Street Address,Wages" & VBCrLf & _ "George Miller,26,100 E. 1st St., Apt. 5,$24/hour" & VBCrLf & _ "John Smith,51,523 S. Wayne Ave.,$35/hour" & VBCrLf & _ "Jackie Chan,32,2223 Wilmington Street,$21/hour" & VBCrLf & _ "Elizabeth Humperdink,32,15541 West Alameda Avenue,$21/hour" & VBCrLf
OutputString = FormatColumns(InputString, "-", 2, 60, 1, True)
2 is the number of spaces between each column
60 would be the limit of the screen char. width
1 being the column I want it to truncate if the rows would go over 60.
True specifies if I want the truncated column to add "..." to show there was something after it that was truncated.
OutputString would be:
Person's Name Age Street Address Wages ------------------ --- ------------------------- -------- George Miller 26 100 E. 1st St., Apt. 5 $24/hour John Smith 51 523 S. Wayne Ave. $35/hour Jackie Chan 32 2223 Wilmington Street $21/hour Elizabeth Humpe... 32 15541 West Alameda Avenue $21/hour
That may not come out right on the web, but if you download my attached file into Notepad with a fixed width font like Lucida Console, you'll see what I mean.
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
Visual Basic 6
Special Conditions / Other:
Please complete within 2 days of bid acceptance.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$30 (USD)
|
Oct 10, 2002 5:29:34 AM EDT
|
9.76
(Excellent)
|
|
|
Hey this would be an easy function to create for you. I can get started on this right away and finish it up and do several testings on the function to make sure it works everytime with out errors. I have done several vb functions before so this should be simple to do.
There is one thing though, just like you stated, you'll have to make sure the font is fixed width in the vbprogram.
-Richard. |
|
|
|
|
|