Article View: free.it.visual-basic
Article #2037Re: Comma Delimited files
From: KillerBoy
Date: Thu, 20 Nov 2003 09:14
Date: Thu, 20 Nov 2003 09:14
39 lines
2517 bytes
2517 bytes
"Mike Cocker" <cockermike@yahoo.com> ha scritto nel messaggio news:1069266910.710065@ns2.worldwithoutwire.com... > 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 > this is an italian group for your problem you can use the input command for getting data and print command for putting data in the new file
Technical Details
Message-ID:
<0C%ub.132995$e6.4767018@twister2.libero.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.mailgate.org!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mailReferences:
<1069266910.710065@ns2.worldwithoutwire.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94ee,8ada399d38c48ea0 X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2003-11-20 01:14:37 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.mailgate.org!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail From: "KillerBoy" <@nospam@@pippo.it> Newsgroups: free.it.visual-basic References: <1069266910.710065@ns2.worldwithoutwire.com> Subject: Re: Comma Delimited files Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <0C%ub.132995$e6.4767018@twister2.libero.it> Date: Thu, 20 Nov 2003 09:14:36 GMT NNTP-Posting-Host: 193.70.27.241 X-Complaints-To: abuse@iunet.it X-Trace: twister2.libero.it 1069319676 193.70.27.241 (Thu, 20 Nov 2003 10:14:36 MET) NNTP-Posting-Date: Thu, 20 Nov 2003 10:14:36 MET Organization: [Infostrada]