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 4 7835
Hello,
Refer the following link: http://groups.google.com/groups?hl=e...gle.com#link11
Does it help you? If it doesn't, let me know what improvements are
required.
Regards,
Srijit
Stephen Boulet <St************@no.spam.motorola.com> wrote in message news:<bi**********@newshost.mot.com>... 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
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 sr****@yahoo.com wrote: Hello, Refer the following link: http://groups.google.com/groups?hl=e...gle.com#link11
Does it help you? If it doesn't, let me know what improvements are required.
Regards, Srijit
Stephen Boulet <St************@no.spam.motorola.com> wrote in message news:<bi**********@newshost.mot.com>...
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
Hello,
Can you send me the code? In the mean time I shall check setcell.
Regards,
Srijit
Stephen Boulet <St************@no.spam.motorola.com> wrote in message news:<bi**********@newshost.mot.com>... There seems to be a problem with UseExcel.setcell:
>>> a.setcell(sht1.Name,1,(1,1))
Traceback (most recent call last): File "<stdin>", line 1, in ? File "excel_from_google.py", line 139, in setcell sht.Cells(row, col).Font.FontSize = fontSize File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 504, in __setattr__ raise AttributeError, "Property '%s.%s' can not be set." % (self._username_, attr) AttributeError: Property '<unknown>.FontSize' can not be set.
Hello,
Can you send me the code? In the mean time I shall check setcell.
Regards,
Srijit
Stephen Boulet <St************@no.spam.motorola.com> wrote in message news:<bi**********@newshost.mot.com>... There seems to be a problem with UseExcel.setcell:
>>> a.setcell(sht1.Name,1,(1,1))
Traceback (most recent call last): File "<stdin>", line 1, in ? File "excel_from_google.py", line 139, in setcell sht.Cells(row, col).Font.FontSize = fontSize File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 504, in __setattr__ raise AttributeError, "Property '%s.%s' can not be set." % (self._username_, attr) AttributeError: Property '<unknown>.FontSize' can not be set. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: PeteCresswell |
last post by:
I've been to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp,
but still don't have a clue.
For example, I've got a chart object namde...
|
by: deko |
last post by:
When using automation (and especially with early binding) I've heard it is
best to use explicit references to
everything. For example:
Dim xlChart as Excel.Chart
rather than
Dim objChart...
|
by: Zero |
last post by:
A B C D E
Date Open High Low Close
Chart = (Excel._Chart)oWB.Charts.Add(missing,missing,missing,missing);
Chart.HasLegend = false;
Chart.ChartWizard(...
|
by: Robin Tucker |
last post by:
Heres and interesting problem:
I have a VB.NET program that creates reports via. Word Automation. This all
works fine. What I want to do as part of this report generation process is
to embed a...
|
by: Jaime Lucci |
last post by:
Hi everyone!
I need to show an excel chart in my application. I can open an excel file
and make the chart, but I want to show the chart inside my form insted of
the excel GUI. I use the...
|
by: c0dergirl |
last post by:
This c# program allows you to select multiple items from a listbox.
For each selected item, a worksheet is created in the workbook with
some information. Right now I create a chart that plots some...
|
by: =?Utf-8?B?U00=?= |
last post by:
Hi,
We have developed an application that transforms xsl into excel file and
present xsl file to the user with data. We use open xml features of excel
2003. Our user is now asking for a chart to...
|
by: madhatter84gn |
last post by:
I am trying to automate an excel spreadsheet and then create a chart.
Dim chartRange As Excel.Range
If rollup Then
chartRange = sheet.Range("O2:Q14", Type.Missing)
...
|
by: j2flk1234 |
last post by:
Hi,
I am trying to graph in VB6 but am having lots of difficulty using MSChart. I switched my strategy to try and use the excel graphing method from VB. I have an excel worksheet with 2 rows,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |