home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
f
/
fixer1.zip
/
CSV2TAB.DOC
next >
Wrap
Text File
|
1991-03-16
|
2KB
|
48 lines
CSV2TAB - an aid in preparing data for desktop publishing or word
processing with proportional fonts.
=================================================================
This little utility is a very simple-minded version of the filter
routines that exist in some more sophisticated software.
It is useful in preparing material for printing when the material has
been saved from a database product or a spreadsheet, or downloaded
from a mainframe, in CSV (Comma-Separated-Variable) format.
This is the format where the fields are variable-length and have
commas between them. Alphabetic fields which might themselves contain
commas are placed in quotes. Typical record:
"Smith, Jones, and Co.","123 Main St.","Atown","MA 02192",144.95,3,"X"
The 144.95 might be an account balance, the 3 and the X might be
codes, etc.
To make this print properly with proportional fonts, you need to
replace the commas with TABS and remove the quotes. Then in your WP
or DTP page you set up the tab stops: in this case, including two
decimal tabs to line up the numeric columns. But converting the text
from CSV to tab format may be tricky. For instance, you can't just do
a global replace of commas by tasb: the commas in the name will
create extra unwanted tabs in the document.
CSV2TAB does the job. Just type CSV2TAB and it will prompt you for the
input file, and a name for the output file: or you can run it with the
two names in the command line, e.g.
CSV2TAB ACCOUNTS.CSV ACCOUNTS.TAB
Feel free to use it any way you want. I've tested it and it works,
but am not responsible for any effects of its use.
It was written in QuickBasic 4.5 with the excellent PDQ library from
Crescent Software, which is what enabled it to be so small.
John Bonavia
39 Bradford St
Needham MA 02192
March 16 1991