View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
Grant Grant is offline
external usenet poster
 
Posts: 27
Default Excel Chart properties from VB.Net 2005

Hi,

I am trying to get a number of properties from a Chart in Excel from my
VB.Net application.

I can get the Chart Type and Chart Title, but need the following properties:

1) Check if the Data Labels show Percentage

2) Find out if the Chart is inserted as a New Sheet, and if so, what it is
called (Name)

3) Check if the Title has a Shadow Border around it

4) Find out the Series (Source Data) used for the Chart

Dim objExcelApp As Excel.Application = Nothing

Dim objWorkBook As Excel.Workbook = Nothing

objExcelApp = New Excel.Application()

objWorkBook = objExcelApp.Workbooks.Open(strFolder & "\ExcelData.xls")

Dim objChart As Excel.Chart = objWorkBook.Charts(1)

With objChart

MessageBox.Show(objChart.ChartType.ToString)

MessageBox.Show(objChart.ChartTitle.Text)

'Check if Data Labels show Percentage

'Get Source Data?

'Find out if Chart location is New Sheet, and if so, name of the Chart

'Check if Title has Shadow Border

End With

I have spent so many hours trying and searching for info, but no luck.

Any help would be much appreciated.

Thanks in advance,

Grant.