Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table to Excel
Message
De
07/01/2004 18:22:20
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
 
À
07/01/2004 18:09:05
Joel Hokanson
Services Integration Group
Bellaire, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00864895
Message ID:
00864903
Vues:
16
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform