Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Automation Creation of an Excel Chart within an Shee
Message
De
15/12/1999 11:32:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00304011
Message ID:
00304127
Vues:
29
>Using Visual FoxPro 5.0 and Excel 97 what is the best way to create an excel chart within a sheet and have complete control through code in FoxPro to manipulate the chart. the chart is not embedded in a form it would be within a worksheet created with CREATEOBJECT("Excel.Application")
>I've been trying without success.


Martin,
Rereading your message I noticed that I missed "within a sheet". Then code changes slightly (ChartObjects for Sheets) :
*....
  .Cells(4,3).value = 42
  .ChartObjects.add(50,50,500,500)
  .ChartObjects(1).Chart.Chartwizard(.range(.Cells(1,1),.Cells(4,3)),xl3DColumn,4,1,0,1,1,"","","","")
  With .ChartObjects(1).Chart
    .hastitle = .t.
*...
    ox.visible = .t.
  Endwith
Endwith
*oX.activeworkbook.saved = .t. && Suppress save dialog
*oX.quit      && Quit excel
=sys(3006,val(nlLocaleId))
50,50,500,500 are Left,Top,Width, Height in points.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform