Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: mike N
  Where is mike N?
 Balt
 Maryland - United States
 mike N
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: Visual Foxpro .CSV code help needed.
Thread ID: 210129 Message ID: 210147 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Saturday, January 03, 2009 4:41:39 PM         
   


>
TEXT TO sampleData noshow
> A B C D
> 0025 FAD 25
> 0120 F20 32
> 0025 FAD 25
> 0125 FDC 48
> 0401 FDC 26
> 0401 FDC 26
> 0125 FDC 48
> 0120 F20 32
> 0025 FAD 25
> 0125 FDC 48
> 0125 QTT 10
> 0125 QTT 10
> ENDTEXT
> 
> 
> lcInput  = "c:\temp\test.csv"
> lcOutPut = "c:\temp\testOut.csv"
> 
> Strtofile(m.sampleData,"c:\temp\test.csv")
> 
> Create Cursor myData (f1 c(10),f2 c(10),f3 i)
> Append From (m.lcInput) Type Delimited With "" With Blank For !Isalpha(f1)
> 
> 
> Select f1, ;
>   CAST(Iif(f1 == '0125' And f2 =='FDC', 'IDC',f2) As c(10)) As 'f2', ;
>   f3 ;
>   FROM myData ;
>   INTO Cursor xx
>   
> BROWSE && as a cursor  
> 
> lcTemp = Forcepath(Sys(2015)+'.tmp', Sys(2023))
> Copy To (m.lcTemp) Type Delimited With "" With Blank
> Strtofile('A B C'+Chr(13)+Chr(10)+Filetostr(m.lcTemp), m.lcOutPut)
> Erase (m.lcTemp)

>
> PS: That is not a CSV file.
>
> Cetin Basoz

I should also add this excel(csv) file uses data all the way to columns BC
and contains 20k+ rows of data. This one code is all I need to change.
Mike



COMPLETE THREAD
Visual Foxpro .CSV code help needed. Posted by mike N @ 1/3/2009 2:35:59 PM
RE: Visual Foxpro .CSV code help needed. Posted by Anders Altberg @ 1/3/2009 3:21:29 PM
RE: Visual Foxpro .CSV code help needed. Posted by Cetin Basoz @ 1/3/2009 3:33:23 PM
RE: Visual Foxpro .CSV code help needed. Posted by mike N @ 1/3/2009 4:37:31 PM
RE: Visual Foxpro .CSV code help needed. Posted by mike N @ 1/3/2009 4:41:39 PM
RE: Visual Foxpro .CSV code help needed. Posted by Cetin Basoz @ 1/3/2009 5:22:19 PM
RE: Visual Foxpro .CSV code help needed. Posted by mike N @ 1/3/2009 8:02:06 PM
RE: Visual Foxpro .CSV code help needed. Posted by Anders Altberg @ 1/3/2009 8:22:47 PM
RE: Visual Foxpro .CSV code help needed. Posted by Cetin Basoz @ 1/3/2009 10:08:08 PM
RE: Visual Foxpro .CSV code help needed. Posted by mike N @ 1/7/2009 8:57:19 PM
RE: Visual Foxpro .CSV code help needed. Posted by Cetin Basoz @ 1/8/2009 1:52:17 AM
RE: Visual Foxpro .CSV code help needed. Posted by tushar @ 1/3/2009 4:59:49 PM