Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tamar Granor
  Where is Tamar Granor?
 Elkins Park
 Pennsylvania - United States
 Tamar Granor
 To: dragon 5
  Where is dragon 5?
 Johor
 Malaysia
 dragon 5
 Tags
Subject: RE: how to save file to particular location
Thread ID: 268880 Message ID: 269000 # Views: 27 # Ratings: 0
Version: Visual FoxPro 6 Category: VFP and .NET
Date: Thursday, July 15, 2010 10:54:50 PM         
   


> Hi. Sorry for wrong type in the &targetLocateFileType. I have change to &targetLocateFile.
>
>
> I have a cursor, cur_attendanceReport and I want to convert to ms.excel file.
>
> now i using "putfile()" to get the location into the textfield of the txtOutputFileLocation .
> After I get the location, it cannot save the file to the location that I choose, it save to the default location, which is locate at vfp98 folder.
>
> my code is like below:
>
>
> targetLocateFile=''
> targetLocateFile=alltrim(thisform.txtOutputFileLocation.value)
>
>
> select cur_attendanceReport
> copy to &targetLocateFile type xls
>
>

Using parens instead of & is the solution to your problem. One additional note, though, is that you probably don't really want TYPE XLS. That's an Excel 2.0 format file. You're better off with TYPE XL5, which is Excel 5.

Among other things, the way dates are handled changed between those two formats.

Tamar

ENTIRE THREAD

how to save file to particular location Posted by loo peng @ 7/15/2010 7:58:06 AM
RE: how to save file to particular location Posted by Christian Tabligan @ 7/15/2010 8:20:05 AM
RE: how to save file to particular location Posted by Jun Tangunan @ 7/15/2010 10:10:18 AM
RE: how to save file to particular location Posted by Christian Tabligan @ 7/15/2010 10:30:49 AM
RE: how to save file to particular location Posted by Glen Villar @ 7/15/2010 10:36:32 AM
RE: how to save file to particular location Posted by Christian Tabligan @ 7/15/2010 10:53:47 AM
RE: how to save file to particular location Posted by loo peng @ 7/15/2010 10:48:26 AM
RE: how to save file to particular location Posted by Christian Tabligan @ 7/15/2010 10:54:31 AM
RE: how to save file to particular location Posted by Tom Saddul @ 7/15/2010 8:28:22 AM
RE: how to save file to particular location Posted by Samir H. @ 7/15/2010 9:12:33 AM
RE: how to save file to particular location Posted by loo peng @ 7/15/2010 10:47:29 AM
RE: how to save file to particular location Posted by Tamar Granor @ 7/15/2010 10:54:50 PM