Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel graphs
Message
De
22/02/2006 06:24:56
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Excel graphs
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01098041
Message ID:
01098041
Vues:
81
Hi
I have a code that populate data in excel.
Every thing is good but I have few small problems:
1. I have a graph in the excel with title base on total of my data, how can I feel the graph title with code.
2. The excel file open as read only (I can write but to save only with other name), how can I change it?
3. My graph showing total from 1998 till 2005, But my uery will bring another line next year (2006) and another in the year after, how can I tell the graph to show all the years?

Here is the code:
#include c:\reports\others\xl97cons.h
#define xltrue -1
#define xlfalse 0

local oexcel, osheet
oexcel = createobject("Excel.Application")
oexcel.visible = 0  && for debugging
oexcel.workbooks.open("c:\exc\test.xls")
osheet = oexcel.activesheet
nline=2
select t2
scan
    nline=nline+1
    iyear=int(t2.year)
    icount=int(t2.count)
   iall=int(t2.all)
    osheet.cells(nline,2).value =iyear
    osheet.cells(nline,3).value = icount
    osheet.cells(nline,4).value = iall
endscan

oexcel.visible = -1   && for debugging

osheet.parent.saved = xltrue
Thanks
Thank you
Chaim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform