(Msg. 1) Posted: Tue Sep 02, 2008 6:40 am
Post subject: Unable to get the Interior property of the PlotArea class Archived from groups: microsoft>public>excel>charting (more info?)
Hi,
I'm using Microsoft.Office.Interop.Excel and VB.Net with ASP.Net to
create an Excel workbook with an Excel chart in a worksheet. Most of
the code works that I developed in VBA. The chart is created. But, it
fails to find any properties or methods of the PlotArea class. Even
though they are "available" in the context menu.
This line works:
xlApp.ActiveChart.ChartArea.Border.LineStyle = 0
But this fails:
xlApp.ActiveChart.PlotArea.Interior.ColorIndex = xlNone
with the error message "Unable to get the Interior property of the
PlotArea class"
(Msg. 2) Posted: Tue Sep 02, 2008 3:43 pm
Post subject: Re: Unable to get the Interior property of the PlotArea class [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
When you run that line does the chart actually have a PlotArea. It wouldn't
for example if no series had yet been added to the chart or if all series
had been deleted.
Regards,
Peter T
<wendell_lucas.DeleteThis@hotmail.com> wrote in message
news:d4a930d7-f08f-492e-92c7-5a1ab0c329a6@k37g2000hsf.googlegroups.com...
> Hi,
> I'm using Microsoft.Office.Interop.Excel and VB.Net with ASP.Net to
> create an Excel workbook with an Excel chart in a worksheet. Most of
> the code works that I developed in VBA. The chart is created. But, it
> fails to find any properties or methods of the PlotArea class. Even
> though they are "available" in the context menu.
>
> This line works:
> xlApp.ActiveChart.ChartArea.Border.LineStyle = 0
>
> But this fails:
> xlApp.ActiveChart.PlotArea.Interior.ColorIndex = xlNone
> with the error message "Unable to get the Interior property of the
> PlotArea class"
>
> (xlNone is a constant)
>
> Has anyone run into a similar problem?
>
> Thanks,
> Wendell
(Msg. 3) Posted: Wed Sep 03, 2008 7:41 am
Post subject: Re: Unable to get the Interior property of the PlotArea class [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Sep 2, 10:43 am, "Peter T" <peter_t@discussions> wrote:
> When you run that line does the chart actually have a PlotArea. It wouldn't
> for example if no series had yet been added to the chart or if all series
> had been deleted.
>
> Regards,
> Peter T
>
> <wendell_lu....RemoveThis@hotmail.com> wrote in message
>
> news:d4a930d7-f08f-492e-92c7-5a1ab0c329a6@k37g2000hsf.googlegroups.com...
>
>
>
> > Hi,
> > I'm using Microsoft.Office.Interop.Excel and VB.Net with ASP.Net to
> > create an Excel workbook with an Excel chart in a worksheet. Most of
> > the code works that I developed in VBA. The chart is created. But, it
> > fails to find any properties or methods of the PlotArea class. Even
> > though they are "available" in the context menu.
>
> > This line works:
> > xlApp.ActiveChart.ChartArea.Border.LineStyle = 0
>
> > But this fails:
> > xlApp.ActiveChart.PlotArea.Interior.ColorIndex = xlNone
> > with the error message "Unable to get the Interior property of the
> > PlotArea class"
>
> > (xlNone is a constant)
>
> > Has anyone run into a similar problem?
>
> > Thanks,
> > Wendell- Hide quoted text -
>
> - Show quoted text -
Thanks, Peter! That was the problem. I hadn't added the series yet.
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum