BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Excel - cant add a TITLE to a CHART

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
Rob
Guest





PostPosted: Thu Feb 23, 2006 12:03 am    Post subject: Excel - cant add a TITLE to a CHART Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.