************************************************ *) Author............: Daniel Gramunt *) Created...........: 12/21/2001 && This is the date from UT message *) Description.......: Formats and sends the content of the currently selected *) : table/cursor to Excel using automation. *) : *) : The following modes are suppored: *) : *) : 1 = ToExcelNoShow *) : 2 = ToExcelPreview *) : 3 = ToPrinterNoShow (Excel file deleted) *) : set sysmenu to default *) : 4 = ToExcelNormal && Nadya Nosonovsky 02/01/2002 04:05:14 PM *) : *) : Returns: Numeric *) : 0 if successful *) : *) : If Error occurred: *) : -1 Parameter missing or invalid value *) : -2 Parameter missing or wrong type *) : -3 No table open in current work area *) : * Calling Samples...: QuickReport(1, "c:\temp\customers.xls") && ToExcelNoShow * : QuickReport(2) && ToExcelPreview * : QuickReport(3) && ToPrinterNoShow * : QuickReport(4) && ToExcelNormal *) : If you want to launch it from a menu, *) : you could add something like this to your startup.prg: *) : Print currently selected table to Excel *) : DEFINE BAR 3 OF DevTools PROMPT "Print Table to Excel" SKIP FOR EMPTY(ALIAS()) *) : ON SELECTION BAR 3 OF DevTools DO QuickReport(2) * Parameter List....: tnMode - See above * : tcOutputFile - Excel output file. Required for ToExcelNoShow mode * Major change list.: * Minor change list.: Nadya Nosonovsky added ToExcelNormal mode and fixed bug when table used under different alias *-------------------------------------------------------------------------------------------------------------------