I tried this new code, but it doesn't check to see if an instance of Excel is already running. Okay, I'm not a purist so I'll forget about checking, especially since the user has a new 333 running NT.
The "&&Do stuff here" needs to be under total control of the user to format, e-mail, etc. If I add the code to close and quit, the user has no opportunity to do anything.
If I leave out the close and quit, and the user selects File Close instead of Exit, then I get the illegal operation.
Did I leave something out?
SET SAFETY OFF
USE finance_report in 0
COPY fields except travnbr_b, travnbr_c to c:\temp\text.xls type xls
SET SAFETY ON
tmpsheet=getObject('','excel.application')
oExcel = tmpsheet.application
oExcel.workbooks.open("c:\temp\text.xls")
oExcel.visible = .t.
oExcel.cells.select
oExcel.selection.columns.autofit
oExcel.range("A1").select
-- Now the user needs total control of their spreadsheet
Release oExcel
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement