Sytze de Boer said "...do a shellExecute to open the spreadsheet"
why bother with shellexecute? - this code works for me (acknowledgements to
this list passim)
* create your excel file - I used a field picker, if you don't need
it omit the fileds parm
COPY TO (cFile) FIELDS &cFields TYPE XL5 && Create Spreadsheet file
* Open the Spreadsheet with nice column widths
WAIT WINDOW 'Creating Spreadsheet' TIMEOUT .5
oXL = CREATEOBJECT("excel.application")
DO WHILE NOT FILE(cFile)
INKEY(.5)
FLUSH
ENDDO
* oXL.displayalerts = .F.
oXL.workbooks.open (cFile)
oRange = oXL.Range([A1], oXL.ActiveCell.SpecialCells(11))
FOR EACH oColumn IN oRange.Columns
IF ISNULL(oColumn.NumberFormat)
oColumn.NumberFormat = "Dd-Mm-yyyy"
ENDIF
oColumn.EntireColumn.AutoFit
ENDFOR
oXL.Visible = .t.
oColumn = .NULL.
oRange = .NULL.
oXL = .NULL.
Andrew Davies MBCS CITP
- AndyD 8-)#
**********************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
Please contact [EMAIL PROTECTED] with any queries.
**********************************************************************
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.