Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SendToExcel() ... doesn't
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00708012
Message ID:
00708916
Views:
10
CT,

>The cReportsObj::SendToExcel() method doesn't seem to send anything to Excel.
>
>REPORT FORM (cFileNameHere) TO PRINTER PROMPT NOCONSOLE
>
>Am I missing something simple here?

Just looking at this code it would appear that Excel is not getting called. However, in the MM Developer's Guide under the topic "Sending Reports to Excel", there is a code snippet that you need to add to the bottom of the DataEnvironment.Init() method of any reports you want to send to Excel:
IF TYPE('poExcel') == 'O' AND NOT ISNULL(poExcel)
	poExcel.ExportCursorToExcel(ALIAS(), pcExcelFileName , .T.)
	RETURN .F.
ENDIF
Although the code snippet is intact, it looks like the explanation in the DevGuide right above it got "lost" somewhere along the line. This text should read:

To send a report to Excel, add the following code to the bottom of the report's DataEnvironment.Init() method:".

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform