Main Board > Programming

Create Chart on excel sheet

(1/1)

Prajin P K:
Hi,
 How can i generate chart on excel sheet together with data table

Prajin P K:
Hi team,
I have created chart on excel sheet by using code found from the documentation, but on execute code  data and chart is coming different excel file. My need is its should come in same file.

Please give the instructions to do that. and also give explanation about how to set properties for creating chart on excel. The example code i have used is given below:


--- Code: ---  OPEN (1)"[DDE]excel;existing_worksheet.wk1"
  OPEN (2)"SALES"
   LET R=0
LOOP:
   LET DIV_ID$=KEY(2,END=DRAW_IT)
   READ (2,KEY=DIV_ID$)DIV_NAME$,DIV_SALES
   LET R=R+1 ! Bump row number
   LET K$="R"+STR(R)+"C1:R"+STR(R)+"C2"
   WRITE RECORD (1,KEY=K$)DIV_NAME$+$09$+STR(DIV_SALES)
   GOTO LOOP
DRAW_IT:
   IF R=0 THEN STOP ! No divisions
   LET X$="R"+STR(R)
   WRITE RECORD (1)"[select(""R1C1:"+X$+"C2"","""+X$+"C2"")]"
   WRITE RECORD (1)"[new(2,1)]"
   WRITE RECORD (1)"[gallery.3d.pie(6)]"
   WRITE RECORD (1)"[window.maximize()]"
   WRITE RECORD (1)"[app.maximize()]"

--- End code ---
Thank you,

Mike King:
Documentation on the Excel macros using DDE is no longer easily available from Microsoft.  You can find the original documentation on Excel DDE from Microsoft in a .HLP file call "MACROFUN.HLP" however, ever since Vista, Windows no longer supports this file format so the file is not of much use on newer systems.

Instead Microsoft recommends you use the COM/OLE interfaces for Excel.  You can find a lot of documentation on the methods and properties associated with this interface online.

PxPlus (like EXCEL) still supports both, DDE for older applications and COM/OLE for newer applications.

Navigation

[0] Message Index

Go to full version