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

Similar Messages

  • How to save the chart as image in the blob?

    Hi,
    I found a few topics with this problem but none solved the problem.
    So, I have a chart created in the IR report and want to convert it to an image and save it in blob.
    I want to print it later or it will send an e-mail
    I use APEX 4.0
    Thanks

    Can someone help with this?

  • How to save JavaFX chart s as images

    how to save javafx charts as images. please help me in this.
    thanks in advance

    Here is my pie2D chart. how to svae it as image file
    Stage {
    title: "Pie Chart"
    scene: Scene {
    content: [
    PieChart {
    title: "What Is Your Favorite Pie?"
    titleFont: Font { size: 24 }
    data: [
    PieChart.Data {
    value: 21
    label: "Pumpkin"
    PieChart.Data {
    value: 33
    label: "Apple"
    PieChart.Data {
    value: 17
    label: "Cherry"
    PieChart.Data {
    value: 29
    label: "3.14159"
    }

  • Save 3d plot to excel as an image

    I am in the report phase of the project and would like to be able to save a 3D plot image (not the data) to an Excel spreadsheet. Any ideas? (The Print.Vi Invoke Node function methods for the front pane are not available in the RTE.)
    Solved!
    Go to Solution.

    If you are using the CW 3D graph then see this thrad on how to insert the graph as an activeX object into PP which should also work with Excel.
    If not the CW 3D graph then ... I have not suggestions.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Save as Excel - Chart become picture in BO4

    in BO XI 3.1, if we save  as excel,
    the chart is still a Excel Chart in Excel file
    But in BO 4, if we save as excel
    the chart in Webi will become Picture in Excel file
    if is a bugs or SAP removed this feature in BO4?
    Thanks.
    John Kong

    Hi,
    If you wish to change this functionality, you could log your request at http://www.ideas.sap.com. It is an open forum where other users can see your request and can vote for it.
    Regards,
    Nakul Mehta

  • 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

  • ActiveX Container showing EXCEL Chart

    Hi,
    I´m trying to display an Excel97 Chart in a Labview 7.0 ActiveX Container.
    I´ve tried several things :
    1. Creating an container that is connected to an Excel file. Then copying the chart I want to display to the file and saving it.
    --> problem : the display won´t refresh until I manually edit the ActiveX document.
    1. Creating an container that is connected to an Excel file. Then changing the source document
    --> problem : not possible in LabView ?
    2. Trying to create a container as an Excel Control.
    --> problem : no such control available ?
    Who can help me ???

    Sorry Microsoft Chart contorl is activeX control that you embed in ActiveX container in LV
    A Rafiq

  • Failed to download chart or image in SharePoint 2010 excel services

    Hi,
    I have one document library in SharePoint 2010. I have uploaded one excel sheet which is having chart. Now when I am trying to open it in browser, but it is showing me below error on chart part of excel sheet.
    'Failed to download chart or Image'
    This is happening on prod server. I tried similar process on lower environment in SharePoint 2010. It is absolutely working fine. I checked all services, settings on both farm but doesn't find any clue.
    Please help.

    Hi,
    What do you mean by lower environment? Does it mean the lower version of SharePoint server?
    To solve this issue should try changing the "Maximum Chart Size" Excel Services Trusted Location setting. 
    By default it is 1MB, so if a chart is bigger than that, it won't render.
    For similar issues, please refer to the following articles:
    http://www.sbeeh.com/post/SharePoint-2010-Excel-Service-Failed-to-download-chat-or-image.aspx
    http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/208d649b-31a9-4d13-8ee3-3984fb92bb85
    Thanks,
    Rock Wang
    Rock Wang TechNet Community Support

  • 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

  • How can I change the legend of a plot in an excel chart using LabView?

    Hi,
    My question is:
    I create a chart in Excel with LabView7 using ActiveX. There are 4 plots in one chart. How can I rename the legend (the name) of each plot with LabView?
    Thanks.
    Michi

    Use the SeriesCollection(1).Name function. In LV, wire up the following:
    _Chart into Method SeriesCollection (index = 1 to 4)
    Cascade into Variant to Data (wire type Excel.Series)
    Wire Series into Property Name, Write the string
    Michael Munroe
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Is it possible to write a script for Excel Chart Conversion to an ai file?

    I tried to record a script and it didn’t work. I will attempt to explain what I am doing (and why) and maybe you guys can tell me if it can be done or not. We are working with Excel charts and we eventually put them into InDesign for a print magazine. Here are the steps as best as I can translate. We are using Illustrator CS6 Version 16.2.0.
    1. Copy Chart from Excel
    2. Paste into Illustrator
    3. Fit Art Board to Graphic
    4. Select All
    5. Change Kerning to 0
    6. Select the Background
    7. Select Same Fill Color
    8. Change Color to 5% Black
    9. Select the grid lines on the Chart
    10. Change the Stroke to 50% Black
    11. Save as an AI file
    There is also a scenario where there are multiple charts and we would like to make multiple art boards in the same file.
    I do this for a few reasons: Remove Rich Black, Adjust Kerning, Eliminate any Font Issues, Easier to Scale, and it chokes our rip because there is no link when they are copied and pasted directly from Excel to InDesign.
    Any guidance would be appreciated. 

    no can do, there's no access to mesh point with scripting, sorry about that.
    have you tried Mesh Tormentor? it is free!!!, but I don't know if it will help with your problem
    http://www.meshtormentor.com/

  • Why are excel charts copied to Illustrator CS 5.1 now coming in as pictures?

    I've been creating charts in Excel 2004 for Mac for years and copying them into Illustrator. They have always previously pasted into Illustrator as vectors illustrations. I've created hundreds of charts in Excel before and copied them to Illustrator to "dress them up" for reports with no problems. I just created a chart in Excel 2004 for Mac and copied it to Illustrator and it came in as a picture. This is the first time I have ever had this happen with an Excel chart.
    I've searched various sites and have not found anyone who's run into this issue.
    Any ideas?

    I have never printed to pdf from Excel. I have always just copied the actual chart and pasted it into Illustrator, then worked on it there.
    The image below is from one of the charts that originated in Excel and then was "dressed up" in Illustrator. It was a fairly complicated chart but it came into Illustrator with no problems whatsoever. (The Excel chart was fairly basic - specifically to avoid any issues when pasting into Illustrator.) All of the drop shadows and other embellishments were made in Illustrator.
    My system has not changed  - other than the usual MS Office updates.

  • How do I save a chart as a jpeg?

    How do I save a chart as a jpeg. In excel I right click, "save as picture." Not seeing anything like that in Numbers.

    Here is a script dedicated to Numbers.
    You will find explanations in French and English at the beginning.
    CAUTION :
    it requires the installation of a Unix command file which gives us the ability to check if a modifier key is depressed.
    During my tests, only shift or fn keys were correctly detected.
    Maybe it was because I did my tests in the AppleScript Editor.
    I choose the fn key which, as far as I know, is not used to define the area to save.
    --{code}
    --[SCRIPT subset_of_numbers_doc_to_jpeg]
    Télécharger getModKey.zip depuis
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Décompacter puis déplacer le fichier getModKey dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:UnixBins:
    Il vous faudra peut-être créer le dossier UnixBins.
    Détails complémentaires dans :
    http://macscripter.net/viewtopic.php?id=33652
    Enregistrer le script en tant que Script : subset_of_numbers_doc_to_jpeg.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Ouvrir un document Numbers et afficher la feuille dont une portion doit être enregistrée dans un fichier jpeg.
    Aller au menu Scripts , choisir Numbers puis choisir “subset_of_numbers_doc_to_jpeg”
    Le script affiche la feuille au format PDF dans Aperçu.
    Sélectionnez la zone à enregistrer puis pressez la touche fn.
    Le script copie la sélection dans le Presse-papiers, ferme le PDF complet,
    crée un nouveau PDF à partir du Presse-papiers
    puis ouvre le dialogue Enregistrer au format jpeg.
    Il restera à définir le nom et la destination du fichier.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Download getModKey.zip from
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Expand it then move the getModKey file into the folder
    <startupVolume>:Users:<yourAccount>:UnixBins:
    Maybe you would have to create the folder UnixBins.
    Details available in :
    http://macscripter.net/viewtopic.php?id=33652
    Save the script as a Script: subset_of_numbers_doc_to_jpeg.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Open a Numbers document and display the sheet whose a subset must be saved in a jpeg file.
    Go to the Scripts Menu, choose Numbers, then choose “subset_of_numbers_doc_to_jpeg”
    The script display the sheet in a Preview's PDF window.
    Select the area to save then press the fn key.
    The script copy the selected area in the clipboard, close the full PDF,
    create a new PDF from the clipboard's contents
    then open a dialog to Save as jpeg.
    Define the name and the storage location.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/11/15
    --=====
    on run
              local nomFenetre, nbw
    Check that the Unix command file getModKey is available in the folder <startupVolume>:Users:<yourAccount>:UnixBins: *)
              set flPth to ("" & (path to home folder) & "UnixBins:")
              tell application "System Events" to set maybe to exists disk item (flPth & "getModKey")
              if not maybe then
                        if not my parleAnglais() then
                                  error "Please, install “getModKey” in the folder" & return & "“" & flPth & "” !"
                        else
                                  error "Veuillez installer « getModKey » dans le dossier « " & flPth & " » !"
                        end if
              end if
              set flPth to quoted form of POSIX path of (flPth & "getModKey")
              tell application "Numbers" to activate
              tell application "System Events" to tell application process "Numbers"
    Get the name of the frontmost standard window
    so that we will not 'speak' to an inspector or to the Find dialog *)
                        set nomFenetre to name of first window whose subrole is "AXStandardWindow"
      keystroke "p" using {command down}
    Wait the availability of the Print sheet *)
                        tell window nomFenetre
                                  repeat until exists sheet 1
                                            delay 0.2
                                  end repeat
                                  tell sheet 1
      click first menu button
      click first menu item of menu 1 of first menu button
                                  end tell -- sheet
                        end tell -- window
              end tell -- System Events
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
                        set nbw to count of every window
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Trigger the menu item Tools > Selection Tool *)
      keystroke "3" using {command down}
              end tell -- System Events
    Now, select the area which must be saved in a jpeg file *)
    Thanks to the command getModKey, loop until the fn key is depressed *)
              repeat
                        delay 0.2
                        if (do shell script flPth) = "131072" then exit repeat
              end repeat
    The fn key was depressed so we may copy the defined area to the clipboard *)
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
    Empty the clipboard. So we will be able to check that the copy task is achieved *)
      set the clipboard to ""
    Copy to clipboard *)
      keystroke "c" using {command down}
    Loop waiting for the achievement of the Copy task *)
                        repeat
                                  delay 0.2
                                  try
      the clipboard as «class PDF »
                                            exit repeat (* Exit when the task is achieved *)
                                  end try
                        end repeat
                        set nbw to count windows
    Close the PDF window *)
      keystroke "w" using {command down}
    Wait the achievement of the Close task *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
                        set nbw to count windows
    Create New PDF from the clipboard *)
      keystroke "n" using {command down}
    Wait the availability of the new PDF window *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Get the name of the new window *)
                        set nomFenetre to name of window 1 --(first window whose subrole is "AXStandardWindow")
      keystroke "s" using {command down}
    Wait the availability of the Save sheet *)
                        repeat until exists sheet 1 of window nomFenetre
                                  delay 0.2
                        end repeat
                        tell sheet 1 of window nomFenetre
      -- properties of every UI elements
                                  tell group 1
      click first pop up button
                                            delay 0.2
      -- properties of every menu item of menu 1 of first pop up button
      click menu item "JPEG" of menu 1 of first pop up button
                                            delay 0.2
                                  end tell -- group
      -- click button 1  (* Click in the Save button *)
                        end tell -- sheet
              end tell -- System Events
    end run
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    --{code}
    Of course, thanks to FastScripts, we may link a shortcut to the script.
    Yvan KOENIG (VALLAURIS, France)  mardi 15 janvier 2011 19:04:38
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Save flex chart to server

    Hello All
    I am in need of your help in saving a flex chart on to the server. Basically I want to export the chart to excel, as I dont find any resource for Flash builder 4, SDK 3.5, I opted the option of 1. saving chart as image to server and 2. accessing that image file in my excel
    Any sample codes should be very helpful, as this is quite urgent. Thanks!

    The problem was, that it is not possible to see the pdf directly from transaction AL11.
    I used the transaction CG3Y to move the file from the server to my desktop, and there I can see the pdf file.
    Solved
    Thanks for the input.

  • Copy Excel Chart into Illustrator: Problem with dotted lines

    Copying an excel chart (2010 and/or 2013, Windows 7 Ultimate) to Illustrator CS6 works okay if line chart lines are solid... but if they are dotted, then in Excel 2010, the dotted line becomes jumbled, and in Excel 2013, the dotted line converts to a solid line... is the only solution to this to save the exel chart as a pdf, or is there another workaround?
    Essentially, I am creating a chart in excel and adding a few notations and graphic elements in illustrator for professional publishing...
    any help would be appreciated... thanks

    This is a follow-up (somehow, my original question was logged under OOBIMICHAEL):
    I finally broke down and bought a MacBook Pro, installed CS6 and Office 2011... and voilà... dotted lines copy from excel to illustrator just perfectly... this is a bit like copying data from Visio to Word, etc... these programs render graphics in very different ways... other than the Mac solution, I also tried the Libre Suite (open source)... which also worked perfectly to copy excel data with dotted lines to illustrator... so, until MS and Adobe actually collaborate together to provide value to its customers, the alternative seems (1) open source, (2) buy a Mac...

Maybe you are looking for

  • Working, now not working

    Hi all, I have just upgraded my PC from my sig data to a MSI K9VGN-V MoBo etc etc. It was working OK with an old 20 pin PSU - 20 pin block and 4 pin block for the CPU. Today I fitted a nice new Corsair VX550w PSU - 24 pin block, now the PC won't powe

  • Mac Pro 5.1 6 core vs. 2013 iMac

    This is probably an odd question, I know. I'm a medical student currently working on a 2010 Macbook Air. I have ~$1800 to spend on a machine that I want to last me for another 4 years at least. No, I don't do any video editing or anything like that.

  • How can I select text within a page?

    Using Firefox on an N900. I cannot select text or interact with google maps. Like you can by going into cursor mode on the N900 native browser. How is this done in Firefox? == Extensions installed: == ADB, youtube enabler + defaults

  • Embedded Flash not working on Safari/Google Sites not just my system

    Hi- This issue is not limited to my system. First some information on my system: Intel based iMac OS X 10.6.5 Safari Version 5.0.2 (6533.18.5) Site affected: www.trpeters.com I uninstalled Flash Player and reinstalled the latest version 3 times yeste

  • Can iPad get a mail virus ? Why is there no software or that yet ?

    I've iPad 3 , it's amazing , but I thought my mail might be vulnerable, as I've been hit in my laptop .is ther any protection for iPad ? Can I get a virus thru mail on iPad ?