Find Jobs
Hire Freelancers

Function to output formatted columns for fixed width fonts

$30-35 USD

Completed
Posted over 21 years ago

$30-35 USD

Paid on delivery
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 ## Deadline information Please complete within 2 days of bid acceptance.
Project ID: 2875650

About the project

1 proposal
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (45 reviews)
3.7
3.7

About the client

Flag of UNITED STATES
Springboro, United States
5.0
151
Payment method verified
Member since Jan 21, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.