ActiveX and Excel Charts

I am currently using LabVIEW 6.0.2 on a WIN98 Machine with Office97. The problem I seem to have is with a chart. I have a chart template created and saved as an XLT file for Labview to call. I then write 401 points of data to the page that is linked to the chart. The chart basically frequency vs amplitude. Y-axis for Amplitude ans X-axis for Freq. the Amplitude is always -4 to 4 and the frequnecy changes, in one instance it is 5.85-6.425 and the chart x-axis range is 5.80 to 6.50 which is great. but when the frequnecy is changed to 5.85 to 7.10 the chart range if 0 to 8. If I could find a way to programmatically change the range I would but I don't see anything. Right now thw Office tool kit is not an option as I am still trying to get the company I am at to upgrade to LV 7.1. if I remove point of data from the middle the chart range shows the same. as it fills the data I can watch it shift from the left but I am not sure how to fix it..
Attached is a zip file with the 2 charts I am describing
Thanks
Jeff
Jeff D.
OS: Win 7 Ultimate
LabVIEW Version: 2011,2010,2009 installed
Certified LabVIEW Architect
Attachments:
chart.zip ‏42 KB

Im still confused how you guys are pulling the ref num for the chart out of these nodes??
Ive tried pretty much every combination of Invoke Node, property node, and used ChartObjects, ChartObject, Chart, Charts.... all I want to do is change the title of my chart.
I've looked at the VI that was posted above that requires a chart ref num... but how the heck do I get the chart ref num from?
Is it off the workbook or worksheet?
GRRRRR, very aggrivated. Im sick of searching through endless heirchies of ActiveX garbage!!!!
Message Edited by MJBrehm on 08-17-2006 03:01 PM
Message Edited by MJBrehm on 08-17-2006 03:03 PM
Attachments:
ActiveXError GRRRRR.jpg ‏507 KB

Similar Messages

  • ActiveX and pie chart problem

    I am trying to create a bar of pie chart in Excel 2003. I am able to insert my data and create the chart, but I need to set the "SplitValue" to 6. I was able to find the property for doing this but I get an error when I run the vi (see attached).  Any thoughts?
    Solved!
    Go to Solution.
    Attachments:
    ActiveX Error.PNG ‏45 KB

    I think your problem is that you don't have "Index" wired for the ChartGroups property. Thus, it may be returning a collection of chart groups, but you are typecasting it to a single chart group.

  • Word 2007 and Excel Chart - Merging

    I am in the process of creating a Benefit Statement in Word 2007 and using the  mail merge features to import my data from Excel. The only issue I am having is trying to create a pie chart at the bottom of the statement.
    Any assistance or advice would be appreciated.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • ActiveX and Excel Questions

    I've done searches and haven't really found what I'm looking for so maybe you guys can help.
    Basically what I want to do is retrieve a named location from Excel and place it on the front panel. I figure the way to do that would be to have an ActiveX container and put the data into that. It is here where I get stuck. Is this possible? I haven't found a way to do that from browsing the VIs and properties. There's a clearer list below of the order I want to do things in.
    1) Open Excel (done);
    2) Retrieve an area of my excel file (done);
    3) take the excel 2-D data area and put the data into a specific area (inside a box for instance) on the FP;
    4) Do what ever I wanna do to the data and write (and save) it back to Excel;
    5) Close Excel (done)
    Is this possible? Or am I being a little too ambitious?
    Gary D

    mikeporter wrote:
    Doesn't sound very ambitious at all. There are many examples shipping with LV on how to interact with Excel. In addition, I have within the past day or so seen some posts on how to read and write 2D arrays of values. I guess my question is that if you are going to be manipulating the data in LV, why mess with Excel at all?
    Mike...
    The way our files are edited now through LV is a pain. Everything is stored in Excel but the data presented in a manageable, albeit very tedious, way through our interface. I'm trying to make it easier to view and easier to change multiple things at once by basically allowing the user to edit the Excel stuff from the LV environment where the data will look like more than justa bunch of numbers in rows and columns.
    Thanks for the info though, I'll revise my searches and see if I can find some clues to help me towards my goal. Thanks.
    Gary

  • Move from Windows to Linux or a RT system that uses ActiveX and Excel?

    So I have a Labview Windows application, which access an Excel file via an ActiveX VI.  I want to port this to Linux or even a RT system.
    Can this be done and still access the Excel file?
    Thanks.

    no.
    ActiveX is pure Windows, you can't use this technique on another platform. only thing you can do is to write your data to a file (text or binary) using the file IO functions and then re-read these files with a second app on a windows platform and write it to excel or access.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • ActiveX and excel error "-2147287038"

    Hi all,
            I'm trying to open excel via the ActiveX "automation open"function, however it occurence  a  error when running the program. The error is detailed as follow:
    error code"-2147287038",string illustrate"未命名 1中的Unknown System Error". Can any guy help me for explaining the problem?
    Thanks a lot in advance

    Hi all ,
            Please you help to answer my question,because i learned the labview myself,so many question can need higher help to explain.
    Thanks,
    Solon

  • 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

  • How to put header and footer information in excel chart

    I modified the create chart.vi, I got from this site and able to create a chart from *.xls file. Now I want to print the filename as header and date and time the chart created as footer in the excel chart. Any idea is appreciated.
    Thank you
    MM
    Attachments:
    Create_Rundown_Chart.vi ‏246 KB
    SN20755-Horiz_1-031027-160128-rundowndata.xls ‏15 KB

    Under the property node _Chart where you have the ChartTitle, add the property PageSetup. Cascade that into another property node and choose CenterHeader and CenterFooter. You can write the strings directly into these properties. Use the following codes:
    Filename = &F, Date = &D, Time = &T
    Be sure to close all references that do not leave the page (ie. Chart, Legend, ChartArea, etc.). Otherwise Excel will hang later on.
    Michael Munroe
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Save excel chart as image (activeX)

    Hi community,
    I have to generate couple thousands xls files which have some data and a chart on the first sheet. Once the files are generated I'd like to sweep thru all of them and save the chart as an image (BMP, GIF, PNG, doesnt matter).
    I have no success though. I assume I am quite close, by using the Chart.export method, but actually nothing happens, the file is not created. (worksheet selection is good, and chart index must be one, as 0 or 2 gives me an error message while one is OK.
    Any ideas?
    thx.
    ps: i know how to export an image of a labview-chart, but I want the export to happen from excel..
    Solved!
    Go to Solution.

    Instead of getting a reference to the workbook worsheets collection you need to get a reference to the workbook charts collection (which is the collection of all the workbook chartsheets) . You select the chart sheet using its index and convert the resulting item to an Excel._Chart object (this is where you use this object). You can then export it.
    Ben64

  • LabVIEW and Excel with ActiveX

    Hi,
    I am using LabVIEW6.1 and I am trying to format data for printout that I have stored in Excel using activeX.
    I have three questions that I included the recorded Excel macro for:
    1) How do I set the horizontal and vertical page breaks using ActiveX?
    Excel macro:
    Set ActiveSheet.VPageBreaks(1).Location = Range("F1")
    Set ActiveSheet.HPageBreaks(1).Location = Range("A41")
    2) How do I set the print area using activeX?
    Excel macro:
    ActiveSheet.PageSetup.PrintArea = "$A$1:$J$57"
    3) How do I left, right center justify the content of cell using ActiveX.
    Excel macro:
    Range("B3:B8").Select
    With Selection
    .HorizontalAlignment = xlCenter
    End With
    Thanks in advance for your time.
    KMA

    You cannot index the VPageBreaks if you are creating a new worksheet. You would use the index to change an existing VPageBreak. To create a new VPageBreak, replace the Item method with the Add method. Wire the range ref directly into the Before input. I fixed your VI and attached it.
    To get the value of the xlCenter constant, open the Visual Basic editor that comes with Excel and use the Object Browser (F2). Type xlcenter into the search window and click the binoculars. The value is displayed at the bottom of the window. You will use that trick a lot when looking for the Excel constants for LabVIEW.
    Michael
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector
    Attachments:
    Excel_Page_Break_mod.vi ‏67 KB

  • Copying Graphs and Pie Charts generated in Analysis View to Email item using Excel VBA Macro Code

    Hi
    I am currently working on an exce VBA macro code that would help me take snapshots of the Graphs and Pie charts generated in QC for a particular application and copy the same to an email item using excel VBA macro code.
    I was able to write the code to create an email item. But I have no clue of how i can take snapshot of the graphs in Analysis View using excel VBA
    Any help would be highly appreciated.
    Thanks in Advance
    Regards
    Amit

    useramit,
    You are in the consumer end products forum.  You will also want to ask your question over at the Enterprise Business Community.
    Click the plus sign (+) next to Discussion Boards to drop down all the options for servers, networking and any other professionally related problems.
    http://h30499.www3.hp.com/

  • Excel Chart High-Low Lines Not Rendering when Chart Object Contains No NumCache and StringCache

    I have a number of Excel xlsx files which contain a Chart object configured with High-low Lines.  The High-Low Lines render without issue when the Number Cache & String Cache exist in the file.  A process updating the files removes the Number
    Cache and String Cache from the Chart Object.  After this process has updated the files Excel no longer observes the High-Low Line configuration.  I have verified that the files still contain the setting for the Chart to have High-Low Lines (<c:hiLowLines
    />).  Excel does not recognize that the setting is set (not rendered when viewed or preserved in the file settings after saving in Excel). Excel does not present any errors and everything else works fine.
    Reproduction of Issue:
    1. Create an Excel Document containing a Chart Object with High-Low Lines enabled.
    2. Manually edit the chart1.xml file (in the xlsx file), removing all the Number Cache and String Cache entries from the document (<c:numCache/>, <c:strCache/>).
    3. Open the Document in Excel and view the Chart.  It will not draw the High-Low Lines and if saved the file will no-longer contain the hiLowLines setting.
    The issue has been confirmed in Excel 2010 and Excel 2013.

    The issue has been tested on different computers, 11 in total.  The OS ranges from Windows 7 to Windows 8.1.
    I have not tried in other file formats.  Due to the requirements of the project I'm restricted to xlsx.
    The application interacting with the files is proprietary.
    I've simulated the issue by removing the Number Cache & String Cache manually from the Chart1.xml file.  This causes the issue to occur.  I will note that if i only remove one of the cache entries from the file the High-Low lines will be observed
    in Excel.  It seems to only happen if all of the cache entries are removed.  The file is never interpreted by Excel as corrupt under any of the modifications.
    The issue seems like Excel fails to evaluate the High-Low Lines property when the cache is completely removed.  I'm not sure what Excel is doing to negate the property under the condition of no cache.  After the files is opened with Excel and saved
    the High-Low Lines property no-longer exists in the file.

  • Having trouble formatting excel chart using Chart Wizard command.

    Problem Description :
    Trying to create an excel chart derived from an excel spreadsheet. Having trouble understanding the parameters to format in the Chart Wizard function to get the desired results. There are no error messages, just chart is not what expected.
    Goal:
    Chart with temperature on the left, y-axis. 3 lines on the graph for min meas temp, avg meas temp, max meas temp.
    Bottom x-axis should contain year/month values.
    Chart Wizard command:
    status = ExcelRpt_ChartWizard (chart_temperature_handle, chart_data_worksheet_handle, D1:G3, ExRConst_GalleryLine, ExRConst_Rows, 0, 0, 0, 1, "Temperature Stats", "Year/Month", "Temp F", NULL)
    NI Software : LabWindows/CVI version 8.0.1
    NI Hardware : None device
    Driver Version :
    OS : Windows XP
    Customer Information :
    Mary Claflin
    Technology Kitchen Corporation
    US
    [email protected]
    Ph: (512) 965-4722

    Hi Mary,
    Looking at the Chart Wizard within Excel, it appears as though the only
    chart type that allows us to give a series of values for our XAxis
    would be the XY Scatter plot. There IS an option for this when using
    the CVI Excel Report function calls (specifying
    ExRConst_GalleryXYScatter for the plot type).
    However, it appears that there are not any Excel report chart functions
    available in CVI to specify anything other than the general "series"
    object. When this object is sent through as a variant data type to
    Excel, Excel appears to automatically convert this single object into
    separate data series. This is because Excel is not immediately aware
    that we are attempting to use a Scatter plot, and thus must convert
    each column into a separate series. There is no object defined in the
    Excel report that would be able to handle the "Xseries" and "Yseries"
    option that are seen in the chart creation wizard within Excel. Thus,
    we have no way of specifying a different set of data for our XAxis.
    It appears as though, at least for our own CVI functions, that there is
    no way to accomplish your goal. Since CVI is based around C - we CAN
    call any ActiveX client registered on the system. Because of this, we
    should be able to talk with Excel directly without the help of the CVI
    Excel Report functions, although this may be more difficult.
    I haven't been able to find any specific C example code, but here is
    the Excel Object Model on which calls to Excel will most likely be
    based:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrconexcelobjectmodeloverview.asp
    Sorry for the inconvenience Mary.
    Dan Weiland

  • Trying to create and excel graph and having trouble finding properties and methods for active x.

    I am trying to use Active X in labview 7 to create an excel graph and the HasMajorGridlines property for charts is not in my menu. Where can I get this property and others that appear to be missing and what is a good resource (looking for anything, especially books) for for using activeX/Labview/excel together?

    I am not sure if there is a book or tutorial how to use excel with LabView. I ncluded a Vi which gives you access to the HasMajorGridlines property. I hope it gives you the clou how to work with excel obejcts...
    Chris
    Attachments:
    excel_example.vi ‏24 KB

  • How to link Excel Chart with multiple columns dynamically?

    Hi all,
    I have one problem. I have an excel chart which has to read data from multiple columns for it's X-axis values (time stamps) and the same number of values for it's Y-axis from multiple columns. See figure attached.
    Now, you can do this by manually assigning values by holding control key to tell the chart that data from many columns is continued from the first column. i.e, a long data is distributed along may columns. This is done very easily manually.
    Now, how to do it at runtime through LabVIEW 8.0?
    Although, I have done it through labview when there where only two columns, A and B streching up to any length. But, now to save space we are dumping into many columns in the same page and want the chart plot that data as we dump it. 
    It is tough since I don't know how to assign SourceData of the chart through labview.
    I have attached chart's SourceData picture.
    Hope you all can solve my problem.
    The Y-axis values are: =(good!$B$30:$B$70,good!$D$30:$D$70,good!$F$30:$F$70,good!$H$30:$H$70,good!$B$71:$B$140,good!$D$71:$D$140,good!$F$71:$F$140,good!$H$71:$H$140,good!$B$141:$B$189)
    good is the name of the file.
    The X- axis values are: =(good!$A$30:$A$70,good!$C$30:$C$70,good!$E$30:$E$70,good!$G$30:$G$70,good!$A$71:$A$140,good!$C$71:$C$140,good!$E$71:$E$140,good!$G$71:$G$140,good!$A$141:$A$189)
    See the columns vary from A to F.
    I have still not got what I love.....
    Attachments:
    ExcelChart.JPG ‏113 KB
    SourceData.JPG ‏34 KB
    XY values.JPG ‏36 KB

    Ok i solved the excel chart problem. Here is the figure showing my victory! But offcourse with NI forum help.
    Message Edited by Halemani on 09-19-2008 06:33 AM
    I have still not got what I love.....
    Attachments:
    Chart_XValues_Values.JPG ‏36 KB

Maybe you are looking for