Filepro-list Digest, Vol 77, Issue 20
Harold
haroldef at sbcglobal.net
Fri Jun 18 12:54:17 PDT 2010
On 6/16/2010 7:14 PM, Kenneth Brody wrote:
> Quoting Boaz Bezborodko (Wed, 16 Jun 2010 16:46:26 -0400):
> [...]
>> If you aren't waiting until the process table finishes (and closes all
>> open files) then the file will be locked by FilePro and Excel won't open
>> it. You have to close a file being exported using the CLOSE command
>> before you can access it.
>
> Well, given that he hasn't told us (1) how he's running Excel, (2) how
> he's telling Excel to open the file, or (3) what error he gets, if any,
> we're all just guessing.
>
Hi,
Sorry I took so long in replying. It is now working, which means that the excel file
is generated (about 1200 names with addresses, sorted by zip code), and while filepro
is running excel opens and the user can see the results, in read only mode, which is
fine.
The code is below, and I haven't tried to clean it up or refine it---if needed.
Harold
::DECLARE LOCAL MACFILE:
::MACFILE="c/maclbs/MAC"{doedit(@td,"MDY","6")&".CSV":
::MACFILE=xlate(MACFILE,"/",chr("92") ):
::DECLARE LOCAL LABLEDATE:
::DECLARE EXEC:
::EXEC="C/PROGRAM FILES/MICROSOFT OFFICE/OFFICE12/EXCEL.EXE"<MACFILE:
::EXEC=xlate(EXEC,"/",chr("92") ):
::LABLEDATE="c/maclbs/MAC"{doedit(@td,"MDY","6")&".CSV":
::LABLEDATE=xlate(LABLEDATE,"/",chr("92") ):
LINE5::FNAME2:
::LNAME1:
::ADDRESS13:
::CITY5:
::STATE6:
::ZIP7:
::export Word merge=(LABLEDATE{""):
line24::dim array[4](50);clear array:
::i(1,.0)="1":
Elabora::NR=NR+"1":
:FNAME ne "" or LNAME ne "":array[i] = ""{ FNAME < LNAME;i=i+"1":
:ADDRESS1 ne "":array[i] = ""{ ADDRESS1;i=i+"1":
:CITY ne "":array[i] = "" { CITY {",";i=i+"1":
:STATE ne "":array[i] = "" { STATE < ZIP;i=i+"1":
::merge(1)=array["1"]:
::merge(2)=array["2"]:
::merge(3)=array["3"]:
::merge(4)=array["4"]:
:NR NE @TS:GOTO END:
::SYSTEM EXEC:
end::end:
More information about the Filepro-list
mailing list