Expert Software Company : News

duminică, 28 octombrie 2012

Excel Graph


#Define Tab Chr(9)
#Define CRLF Chr(13)+Chr(10)

Public oGraph
_Cliptext = "" ;
+ Tab + "Depto X" + Tab + "Depto Y" + CRLF + ;
"Arroz" + Tab + "248" + Tab + "297" + CRLF+;
"Maíz" + Tab + "339" + Tab + "440" + CRLF+;
"Cereal" + Tab + "500" + Tab + "489" + CRLF+;
"Papas" + Tab + "125" + Tab + "235" + CRLF+;
"Otros" + Tab + "631" + Tab + "455" + CRLF

oGraph = GetObject("","Excel.Chart")

With oGraph.Application
.Visible= .T.
.WorkSheets(1).Cells().Clear
.WorkSheets(1).Cells(1,1).PasteSpecial
.Charts[1].AutoFormat(-4100,1)
EndWith

Niciun comentariu:

Trimiteți un comentariu