Welcome, Guest. Please login or register.

Login with username, password and session length
Pages: [1]   Go Down
Print
Author Topic: External File Open  (Read 1912 times)
0 Members and 1 Guest are viewing this topic.
JL_CAD
Member

Posts: 15


View Profile
« on: January 08, 2007, 08:03:35 AM »

I'm trying to have Filepro open and close an excel file after an export operation, but keep getting an error:

::declare handle_for_remove(256):
::handle_for_remove=remove("f:\QC\QCFINAL\data\exrev.txt"):
::export word twr=f:\QC\QCFINAL\data\exrev.txt:
::twr(1)=2; twr(2)=13; twr(3)=1:
::declare handle_for_open(256):
::handle_for_open=open("f:\QC\QCFINAL\data\exrev.xls"):

Is it even possible for Filepro to open an external file?
Logged
Ray Hoover
Member

Posts: 15


View Profile
« Reply #1 on: January 10, 2007, 03:11:16 PM »

JL_CAD,

Try changing your processing based on the following.

::declare handle_for_remove(256):
::handle_for_remove=remove("f:\QC\QCFINAL\data\exrev.txt"):
::export word twr= ("f:\QC\QCFINAL\data\exrev.csv")
::twr(1)=2; twr(2)=13; twr(3)=1:
::close twr:
::declare handle_for_open(256):
::handle_for_open="f:\QC\QCFINAL\data\exrev.csv":
::system "start"<handle_for_open:

Say that the above processing is in a table named 'export_exrev'

Do a call from input processing as follows.

@keyE
then: call "export_exrev"; end

When pressing [E] at the selection prompt, fields 2,13 & 1 will be exported, the export file is closed and the system call will launch Excel and display the 3 fields in  Excel.

 

Logged
JL_CAD
Member

Posts: 15


View Profile
« Reply #2 on: January 16, 2007, 08:55:08 AM »

Thanks for the help Ray, this is what I have now:

::declare handle_for_remove(256):
::handle_for_remove=remove("f:\QC\QCFINAL\data\exrev.txt"):
::export word twr=f:\QC\QCFINAL\data\exrev.txt:
::twr(1)=2; twr(2)=13; twr(3)=1:
::end:
@once:::
::declare handle_for_open(256):
::handle_for_open="f:\QC\QCFINAL\data\exrev.bat":
::system "start"<handle_for_open:

I am exporting to a text file and then running a batch file after the information is out.

My next step would be to have this table run every time a new record is added.

Would that be a call from input processing?

Logged
Pages: [1]   Go Up
Print
Jump to:  

Valid XHTML 1.0! Powered by SMF 1.1.15 | SMF © 2011, Simple Machines | Massive Blue Theme By Cadosoas Valid CSS!