How to use ActiveX Microsoft Office Excel Chart?

Does anyone know how to use "ActiveX Microsoft Office Excel Chart" from CVI 7.0? I tried with following code but it did not draw anything.
HRESULT MakeChartInExcelActivexCtrl(void)
HRESULT error = 0;
char szErrMsg[256];
// Create a new chart with its own worksheet
// ExcelRpt_ChartNew(workbookHandle,-1,&chartsheetHandle);
SetWaitCursor (1);
// Open new Range for Worksheet
error = CA_VariantSetCString (&MyCellRangeV, EXCEL_ARRAY_OF_CELLS);
error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, &ExcelRangeHandle);
CA_VariantClear(&MyCellRangeV);
if (error<0)
CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
goto Error;
error = Excel_GetProperty (excelChart, NULL, Excel_WindowActiveChart, CAVT_OBJHANDLE, &ExcelChartHandle);
if (error<0)
CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
goto Error;
// Create a XY scatter chart using the data we wrote to the worksheet as its data source.
error = ExcelRpt_ChartWizard(ExcelChartHandle, ExcelWorksheetHandle, EXCEL_ARRAY_OF_CELLS,
ExRConst_GalleryXYScatter, ExRConst_Columns, 0, 0, 0, 0, "Filtered Data Chart", "",
"Weather Data", NULL);
if (error<0)
CA_GetAutomationErrorString(error, szErrMsg, sizeof(szErrMsg) );
goto Error;
// Change the plot lines to not display markers and smooth out
// the plot lines. This is one of the plot styles available in Excel.
error = ExcelRpt_SetChartAttribute (ExcelChartHandle, ER_CH_ATTR_CHART_TYPE, ExRConst_XYScatterSmoothNoMarkers);
if (error<0)
CA_GetAutomationErrorString(status, szErrMsg, sizeof(szErrMsg) );
goto Error;
Error:
SetWaitCursor (0);
CA_VariantClear(&MyCellRangeV);
CA_VariantClear(&MyVariant);
ClearObjHandle (&ExcelRangeHandle);
ClearObjHandle (&ExcelChartHandle);
ClearObjHandle (&ExcelChartObjHandle);
ClearObjHandle (&ExcelChartsHandle);
if (error < 0)
ReportAppAutomationError (error);
return 0;
Attachments:
excelActivexCtrl.zip ‏4692 KB

I use C:\Program Files\National Instruments\CVI90\toolslib\activex\excel\excelreport.fp to  build/modify excel report.there is very detail configuration in this function moudule , hope it can help you 
Sonic
Diffrent Strokes for Different Folks

Similar Messages

  • How can I download Microsoft office excel  for my MacBook Pro Mac OSX version for free. Please help me!

    How can I download Microsoft office excel for my MacBook Pro  for free?

    You can't. Excel is a commercial product sold by Microsoft in an Office "package" and not as a stand-alone product.
    If you need to be able to open and save Excel documents on your Mac, however, you could try the free LibreOffice.
    Clinton

  • How to use ActiveX-Microsoft Calender Control as a way to schedule time (e.g., and online sign up calender or day planner

    I operate a user facility for several testing instruments.  I am looking for a Lavbiew VI that will allow user to reserve time on the instruments.  I did a search and found the ActiveX Microsfot Calender Control.  This will display a calender and allow you to choose the month, year and date. I would like to place a control on the front panel that will allow the user to select the date, be prompted to tpye in the time to reserve ( e.g., 1:00pm to  4:00pm) and have it display on date on the calendar front panel.  Is this possible?  Thanks.

    OK, so everybody has forgiven everybody -- I guess.
    I any case, you aren't going to find one control that does everything. What you need to do, for the data input portion at least, is create a VI that to the operator looks and operates like a dialog box. There are some examples that show in general how to do that. My recommendation is to play with one of those examples until you understand the principles involved and then start modifying it to collect from the user the data that your application needs.
    Mike...
    PS: as you work through this challenge feel free to ask lots and lots of specific questions.
    PPS: going to be at NIWeek?
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Just upgraded to Lion, how can i use my microsoft office especially excel.  I'm getting messages that it's no longer supported.  This is a BIG problem.  Help, please.

    Just upgraded to Lion, how can I use my microsoft office especially excel.  I'm getting messages that it's no longer supported.  This is a BIG problem.  Help, please.

    Apple has made a serious error not advising people when the Lion upgrade occurs that their present software may/will not be compatible and advise the user of such before and allow a opt out.
    All you can do (besides upgrading all your software) is backup your data off the machine (not to TimeMachine) and disconnect all drives.
    Hold c boot off the 10.6 disk and erase your makers hard drive on the far left, (that's the entire drive of everything)
    Partition tab: Option: GUID, format OS X extended and click apply so you get a new GUID (replacing the Lion one or trouble occurs later)
    Quit and install 10.6, then go through setup and use the same name as before, then update to 10.6.8
    Then c boot off the 10.6 disk again and use Disk Utility to Repair the disk the 10.6.8 update messed up.
    Then install all your programs again from fresh sources and lastly your user files in the same main user folders as before (music, pictures, documents etc.)
    Done as described will get you back just like it was before as close as possible, make SURE to use the same username or else your iTunes and other files get all messed up. Password and drive name can be different though if you wish.
    Note: if you've upgraded from 10.5 to 10.6, then you don't get the free iLife as it's not on the 10.6.3 white disks, only on the disks that came with your machine. So that will have to be purchased and reinstalled or use Pacifist to extract it from the 10.5 disks.
    This handy site can advise you what software doesn't work with the Lion.
    http://roaringapps.com/apps:table

  • Help and some explanation how to get a Microsoft.Office.Tools.Excel.Worksheet host item that extends the functionality of the current Microsoft.Office.Interop.Excel.Worksheet object

    Hello,
    I would use some help and more info about how to get host object that extends the functionality of my current Interop.Excel.Worksheet object. I read this artical: https://msdn.microsoft.com/en-us/library/ee794671.aspx where I can call this function
    GetVstoObject to get host object. But I see that here I need to pass the Globals.Factory object as second parametar. Can someone give me more details about that parameter and how to access it? I would like to get host object so I can access extension
    property, since my interop excel worksheet doesn't have it.  
    I am using Visual Studio 2013 for developing Excel addin. Using Excel 2010.
    Thanks in advance for help.
    Regards,
    Zeljka

    Hi Zeljka,
    >>I am using the Microsoft Office PIAs, so my question is how to access this automatic generated class Globals in my case?   <<
    Sorry, I am not able to understand the application you were developing exactly. From the orgnal post, you were developing an application level add-in, however based on the description above, it seems that you were building an console or Windows form application
    to automate Office application.
    If you were developing Office automation, the host item can't work for this secnario since it should run under the VSTO runtime.
    If I misunderstood, please feel free to let me know.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use ActiveX to open/write to Excel template but not to overwrite it

    Hi there again (it's me...if anyone recognised me...)
    I managed to use ActiveX to open Excel and make it visible onto the screen. But I would like to know how can I make Excel open an Excel template and let me write data to the cells without overwriting the original template. I did try to use another program source such as the EXCEL TOOLKIT but I can't still figure out how does it work for my case. Is there a simpler example for me to refer too? Please help.
    Thank you,
    juni

    Hi Mike..
    I have tried to use the examples provided LabView 6.0. I don't understand how to use the Range value to get the data from my global array and also how to open the template and write data to it.
    At the moment, I could only open a saved dialog box and a default string filename is used to save my data into a new Excel but not the formatted excel which I want.
    If possible, please help again. Vi attached.
    Attachments:
    savefile.vi ‏109 KB
    datarecords.vi ‏12 KB

  • How to use ADO(Microsoft ActiveX Data Objective 2.8 Library) to execute the store procedure of database in SQL server

    how to use ADO(Microsoft ActiveX Data Objective 2.8 Library) to execute the store procedure of database in SQL server?
    Does any body can tell me about this?
    thanks
    [email protected]

    Hi 
    Did you succeed to execute the procedure?
    How ?
    Thanks
    Shimon Zerbib

  • Empty Presentation Catalog using Oracle BI for Microsoft Office (Excel, PP)

    Hi everyone,
    after installed Oracle Business Intelligence for Microsoft Office (Excel and PowerPoint) and configured according to this I only see an empty Presentation Catalog when I log on Excel or PowerPoint.
    I've already see this thread and nothing seems to solve the problem.
    Any ideas?

    Hi John,
    when I test my connection of Oracle BI for Office it says "Test connection successful", so I suppose there's no problem with connection or port.
    Edited by: user10526908 on Mar 9, 2009 8:00 AM

  • Microsoft Office Excel - compatibility Checker message in BPC 7.5

    Hello Experts,
    We are using BPC 7.5 M with Office 2007 on Application Server, we have upgraded from BPC 5.1 with Office 2003 where Dimension were of .xls and templates & Reports were of .xlt (office 2003 format) , After upgrade we have not done any changes in Dimension, Templates, reports version and they all are in .xls (Dimension) & .xlt (templates & reports) version
    We are getting a error while saving a dimension in Admin module (by clicking on "Save to Server" link):
    Microsoft Office Excel - compatibility Checker
    Significant loss of functionality
    Some cells have overlapping conditional formatting ranges.
    Earlier version of Excel will not evaluate all of the conditional
    formatting rules on the overlapping cells. The overlapping
    cells will show different conditional formatting.
    Do we need to convert the dimension files in 2007 format (.xlsx) or how to avoid the above told message while saving dimension file.
    Thanks,
    Rohit

    Hi Rohit Khatak,
    Could you solve your problem? I'm having this issue while processing ACCOUNT dimension (and only ACCOUNT) on Development environment, and nothing was changed at the server.
    Every time I try to save, I receive this compatibility error, and when I press "Continue", the file gets with a strange format. If I press the save again, it stil gives me the same error.
    I already tryed to process the dimension, to Refresh Dimension Members, and the error persists.
    Is there a way to solve this problem at BW side? On RSD1 maybe?
    Thanks in advance.
    Yours,
    Adriano

  • Microsoft Office Excel has encountered a problem and needs to close

    Hi,
    I am executing the following code in an excel application and while closing excel I am getting the error
    'Microsoft Office Excel has encountered a problem and needs to close'.
    EnterpriseSession boEnterpriseSession;
    ReportEngines boReportEngines ;
    IReportEngine boIReportEngine;
    CrystalDecisions.Enterprise.SessionMgr loginSessionManager = new CrystalDecisions.Enterprise.SessionMgr();
    CrystalDecisions.Enterprise.EnterpriseSession boEnterpriseSession = loginSessionManager.Logon("userName", "password", "cms", "authentication");
                        int iMinuteNumber = 1;
                        int iLogonNumber = -1;
                        string strToken = boEnterpriseSession.LogonTokenMgr.CreateWCAToken("", iMinuteNumber, iLogonNumber);
                        boReportEngines = new ReportEngines(strToken);
                        boIReportEngine = (IReportEngine)Session.boReportEngines.getService(ReportEngineType.WI_ReportEngine);
    The exception that is displayed while debugging is 'BusinessObjects.ThirdParty.OOC.OB.AssertionFailed'.
    Thanks,
    Divya
    Edited by: dpanicker on Jun 23, 2010 6:47 AM
    Edited by: dpanicker on Jun 23, 2010 7:26 AM

    I'm curious how you are running this code within excel as I would expect you would've had to write a dll to expose the SDK as COM in order to be able to access it from an excel document.

  • How can I transfer Microsoft office from my old macbook pro to macbook air

    how can I transfer microsoft office from macbook pro to macbook air?

    Assuming you have the 2011 version the easiest way is go to Microsoft's Web site and download Mac Office 2011 onto your MacBook Air and then run it. If you have the 2008 (or the 2011) version on disc you can turn on DVD sharing in the Sharing control panel of your MBP and install it by remotely sharing your MBP's DVD.
    Since Microsoft uses activation when you start Office on the new computer if you use the same activation code as you used on the MBP you'll probably get a message to call Microsoft. Do so and just explain that you got a new computer.

  • Unable to save xls file from website in the "Microsoft Office Excel 97-2003 Worksheet" format. The browser is saving in unrecognized "File" Type

    The version I am using is 3.6.11
    The file is stored in the server in the format "Microsoft Office Excel 97-2003 Worksheet"
    But when I download it, it gets saved in the unrecognized format type "File"
    The servlet code written to download the file sets the content type to "application/vnd.ms-excel"
    I am able to save the file in Microsoft Office Excel 97-2003 Worksheet format using Internet Explorer Browser without any issues.
    But it does not work with the Mozilla Firefox. Any plug-in needed to make it work?

    Did you try to add the .xls file extension yourself to those files?

  • How can i transfer microsoft office to my new macBook air?

    How can I transfer microsoft office from my old MacBook Air to my new one?

    All your data will be transferred if you use Setup Assistant, which starts automatically the first time you boot the new machine. You may need to contact Microsoft to reactivate the product.

  • Microsoft Office Excel 2007 Document Password Lost

    Hi All,
    Anyone know how to recovery Microsoft Office Excel 2007 Document Password? Please advise.
    Thanks & regards,

    Try the password remover at http://www.straxx.com/excel/password.html. I know it works for Excel 2003 files. It may work for your 2007 file as well.

  • How do I add microsoft office to an external hard drive when my start up disc is full?

    I have installed adobe collection and final cut studio on my macbook pro. That being said my start up disk is full and I need microsoft office so I was wanting to know how I could add microsoft office to and external hard drive without deleting the whole adobe collection and reinstalling because I can't put office on my computer. Also I have a 120 gb solid state hard drive so hard drive kit would be expensive to replace and a hassle to redownload programs.

    When you say full, how full do you mean? If you are under 10% of free space, you are headed for a big crash. I hope you have everything backed up.
    You can copy MS office to an external drive but you don't want to run it, or any other program from an external drive, inclduing flash drives. You'd be much better off moving your music, photos, and/or documents to the external and putting your applications that you are using on the MBP hard drive. If you need to use the music, photos or documents, then drag them individually over to the MBP. Adobe CS and MS Ofice should definitely reside on the hard drive, no question about it.

Maybe you are looking for