Thank you Gabriel and Tim Indeed the Chart.Location was causing a problem, and I had not suspected it was since I do not use this method in my main program (It was just something I had written as an example). Actually, it seems that the Copy method of either a chart or a sheet is also corrupting the original objects which thus cannot be congigured correctely after. In the case of Copy it is even more annoying since the copy itself is not perfect : some axis labels erradically disappear during the process. Well, at least I now have a way of continuing my project thanks to you. (I would have prefered to stick to the copy method since opening and copying a sheet with all the charts pre-formated takes only half a second whereas generating 11 charts and setting the appearence takes about 4 seconds.. but well, it's better than nothing)
Thankyou once again then, Fabrice Capiez Tue, 28 Jun 2005 07:43:50 -0300 頃に 『Re: [python-win32] Unable to set an Excel chart's titlethrough win32com : can you reproduce this problem ?』の中で Gabriel Genellina <[EMAIL PROTECTED]> さんは書きました: > At Tuesday 28/6/2005 06:03, Capiez Fabrice wrote: > > >chart.Location (Where=constants.xlLocationAsObject, > >Name=sheet.Name) > >try: > > chart.HasTitle = True > > chart.ChartTitle.Characters.Text ="title" > > > >The following produces: > > > >Excel failed with code -2146827864: OLE error 0x800a01a8 > >No extended information > > > >The same error occurs if I try to set an axis title > >instead of the chart's title. It also occurs whether I > >first set chart.HasTitle to True or not. I > > Error 800a01a8 is "Object required" > The error is triggered by the chart.HasTitle line, before setting the title > text. > So I guessed, chart does not point to a valid object on that line. > Commenting out the previous line chart.Location(...) solved the problem. > I was unable to find documentation on the Location() method, but I guess > that moving the chart to another sheet invalidates the object reference > (which may be tied to its current location...) > > > Gabriel Genellina > Softlab SRL __________________________________ Save the earth http://pr.mail.yahoo.co.jp/ondanka/ _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32