🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #2034

Comma Delimited files

#2034
From: Mike Cocker
Date: Wed, 19 Nov 2003 16:43
26 lines
2205 bytes
Hi all,

I have a comma delimited file that I normally manipulate in Excel, but I
really want to speed things up by automating it. With some help from this
newsgroup, I think I can do this in VB.

The comma delimited file (http://www.swandust.com/rpt_cdc_new.txt) needs to
be converted into a very similar file
(http://www.swandust.com/rpt_cdc_changed.txt). I don't want to make a
lengthy post, so I'll take baby steps first and just do a portion of what is
needed for rpt_cdc_changed. Once this is accomplished, I can explain the
remaining steps in a future post. I think the easiest way to explain what I
did is to walk you through the steps I take in Excel to make
rpt_cdc_changed.txt.

1) Import rpt_cdc_new.txt into Excel.
2) Insert a column titled "SortCode" inbetween "Stop" and "Week".
3) The formula in the "SortCode" column is something like
=CONCATENATE(E2,IF(C2="a","AC",IF(C2="b","BD",IF(C2="c","AC","BD"))),D2)
4) Create 5 rows after "Cust No" titled "DelType", Route Code", "Seq1" and
"Seq2"

If VB can automate this with a click of a buttom, I'll be so happy. Thanks
in advance.

Mike
Technical Details
Message-ID: <1069266910.710065@ns2.worldwithoutwire.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94ee,8ada399d38c48ea0,start
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2003-11-19 08:43:48 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail
From: "Mike Cocker" <cockermike@yahoo.com>
Newsgroups: free.it.visual-basic
Subject: Comma Delimited files
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Organization: none
Message-ID: <1069266910.710065@ns2.worldwithoutwire.com>
Cache-Post-Path: ns2.worldwithoutwire.com!unknown@209.162.237.59
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
Date: Wed, 19 Nov 2003 11:43:47 -0500
NNTP-Posting-Host: 216.185.76.4
X-Trace: nnrp1.uunet.ca 1069260228 216.185.76.4 (Wed, 19 Nov 2003 11:43:48 EST)
NNTP-Posting-Date: Wed, 19 Nov 2003 11:43:48 EST