On 23.11.2008 00:36 in vtech-convert Peter Rejto wrote:
>
> I was glad to learn that the case of "New York" is a bit more
> complicated. In other words, I can come back to this problem later.
Glad? ;-)
Here a possible solution.
(It is a bit special for your list of state names,
so don't use it as is for other conversions
without checking!)
// remove all commas
// (usually too brutal, but for the given data it works)
Replace(",", "", BEGIN+ALL+NOERR)
// replace all spaces by commas as field delimiter
// (including spaces within state names ...)
Replace("|W", ",", BEGIN+ALL+NOERR)
// restore names with spaces by replacing back comma with space
Replace("([^0-9]),([^0-9])", "\1 \2", BEGIN+ALL+NOERR+REGEXP)
// save as .csv
File_Save_As("|(PATH_ONLY)/|(FILE_ONLY).csv")
> After importing the .csv file into excel I did it by hand. So, Vedit
> did 90% of the conversion job for me and that is great!
>
> As you know, I do not have a programming background.So, I can not
> figure out something like,
>
>> That conversion macro isn't appropriate in your case.
>>
>> It converts fixed-length data files to .csv format. Your data is
>> variable length and needs another approach.
Vedit's help describes the conversion macro in detail, with examples.
The topic is named: "Converting 'Flat' Data Files to/from CSV"
Perhaps it's not really easy to find...
Use the menu {Edit, Convert}, then press F1 while the conversion submenu
is diplayed. In the description of "Flat to CSV" there is a link.
or:
Help - Index - Search - "CSV"
Christian