![]() |
Export Charts as JPG using VB.NET
Hi,
I tried searching this group and others to find a way to export a chart from excel using vb.net but I can't seem to find any solution. I'm trying to avoid using VBA. I'm trying: xlsheet.ChartObjects("ChartName").Export("test.jpg ", "test") but that doesn't seem to be working. The export method doesn't seem to work. I get this error: "Public member 'Export' on type 'ChartObject' not found." Any help would be great. Thanks, JP |
Export Charts as JPG using VB.NET
I mean,
xlsheet.ChartObjects("ChartName").Export("test.jpg ", "jpg") "JP" wrote in message ... Hi, I tried searching this group and others to find a way to export a chart from excel using vb.net but I can't seem to find any solution. I'm trying to avoid using VBA. I'm trying: xlsheet.ChartObjects("ChartName").Export("test.jpg ", "test") but that doesn't seem to be working. The export method doesn't seem to work. I get this error: "Public member 'Export' on type 'ChartObject' not found." Any help would be great. Thanks, JP |
Export Charts as JPG using VB.NET
Hi
ChartName seems like a variable ? If so then don't put quotes around it. You need a .Chart in there too. Quote Excel VBA Help: "This example exports chart one as a GIF file. Worksheets("Sheet1").ChartObjects(1) _ ..Chart.Export _ FileName:="current_sales.gif", FilterName:="GIF"HTH. Best wishes Harald "JP" skrev i melding ... I mean, xlsheet.ChartObjects("ChartName").Export("test.jpg ", "jpg") |
Export Charts as JPG using VB.NET
Nevermind, I found it.
Wrong: xlsheet.ChartObjects("ChartName").Export("test.jpg ", "jpg") Correct: xlsheet.ChartObjects("ChartName").Chart.Export("te st.jpg", "jpg") "JP" wrote in message ... I mean, xlsheet.ChartObjects("ChartName").Export("test.jpg ", "jpg") "JP" wrote in message ... Hi, I tried searching this group and others to find a way to export a chart from excel using vb.net but I can't seem to find any solution. I'm trying to avoid using VBA. I'm trying: xlsheet.ChartObjects("ChartName").Export("test.jpg ", "test") but that doesn't seem to be working. The export method doesn't seem to work. I get this error: "Public member 'Export' on type 'ChartObject' not found." Any help would be great. Thanks, JP |
All times are GMT +1. The time now is 02:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com