 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rob Guest
|
Posted: Thu Feb 23, 2006 12:03 am Post subject: Excel - cant add a TITLE to a CHART |
|
|
I'm using C++Builder V5 update 1.
I'm using the Excel component (Excel_97) from the component pallet.
I'm have Excel 97 installed on the computer (and no other versions of
Excel).
Problem:
Can't get a hold of the title of an Excel chart.
Example:
ExcelWorksheetPtr ws = wb->Sheets->get_Item(WideString("Sheet1"));
RangePtr r = ws->get_Range(WideString("C4:D11"));
ExcelChartPtr c = wb->ActiveChart;
ExcelChart1->ConnectTo(c);
ExcelChart1->SetSourceData(r, xlColumns);
ExcelChart1->Location(xlLocationAsObject, WideString("Sheet1"));
ExcelChart1->Set_HasTitle(0, TOLEBOOL(true));
// Every thing works fine up to here. If I return here the chart will
// appear in the Excel worksheet.
// This next line causes an exception.
TOLEBOOL b2 = ExcelChart1->Get_HasTitle(0);
OLECHECK(..) fails and we end up at DebugHlpr_HRCHECK(...) with the
HRESULT parameter being -2147221080L (0x800401A8).
Any ideas?
Help!
Thanks in advance. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot 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
|
|