General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Joel,
Here is some quick code that will show one way to do it using the clipboard. You could also insert values directly into cells.
Gary
LOCAL oExcel
oExcel = NULL
USE MyTable
_vfp.DataToClip('MyTable',RECCOUNT('MyTable'), 3)
oExcel = CREATEOBJECT('Excel.Application')
IF !ISNULL(oExcel)
oExcel.Workbooks.Add
oExcel.ActiveSheet.RANGE('A1').SELECT
oExcel.ActiveSheet.Paste()
oExcel.visible = .T.
oExcel.ActiveSheet.RANGE('A1').SELECT
*-- Windows API call to set the top window
DECLARE integer BringWindowToTop IN WIN32API integer
BringWindowToTop(oExcel.Hwnd)
ENDIF
>How do I send a table to Excel?
>
>I know I just:
>Use MyTable
>Copy to MyTableExcel type xls
>
>But I want to open Excel and have it displaying MyTableExcel
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only