Embedding a chart in excel

S

Stephen Boulet

I'm having trouble scripting Excel to embed a chart from python.

Say I have created a sheet object and a workbook object, "xlSheet" and
"xlBook".

Creating a chart in front of my sheet is as easy as:

xlSheet.Select()
xlChart = xlBook.Charts.Add()

Now how do I tell it to go embed itself in my sheet? In VBA, it might be
something like:

xlChart.Location Where:=xlLocationAsObject, Name:=xlSheet.Name

Thanks.

(Is there a newsgroup/list with more of a focus on issues like this than
c.l.py?)

-- Stephen
 
S

Stephen Boulet

Very nice. I was working on my own excel classes, but I see this does lots.

Im my example, I can see from the code that arguments to the Add method
aren't optional. Thanks.

Maybe this should be in the python cookbook?

-- Stephen
 
S

srijit

Hello,
Can you send me the code? In the mean time I shall check setcell.

Regards,
Srijit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top