Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been trying now for hours and just can't get it right!
I am trying to export a bar chart as a bar chart in a macro to excel, however it just pastes it as a table. Is there any way that I can paste as a picture or bar chart into excel.
The macro script i am using is :
Set chartToExport = ActiveDocument.GetSheetObject("CH2231") | |
Set chartProperties = chartToExport.GetProperties | |
chartToExport.CopyTableToClipboard true | |
curSheet.Paste curSheet.Range("A50") |
If you need only the image of your barchart you can simply use properties of your chart, go in the tab caption anc check the checkbox copy image to clipboard
I need to automate 15 charts to run into an excel file to be emailed out, I can't run this manually everyday.
That's what my big problem is. And on access point it will not export as a bar graph on export either ....
Mandy,
No sure if the following code will work. check it.
Sub ExportGraph()
Dim vSheet
Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = TRUE
Set XLDoc = XLApp.Workbooks.Add
vSheet = ""
vSheet = "Sheet1"
ActiveDocument.GetSheetObject("CH26").CopyBitmapToClipboard 'Copy the charts
XLDoc.Sheets(vSheet).Range("A" & 1).Select
XLDoc.Sheets(vSheet).Paste
Set XLDoc = Nothing
Set XLApp = Nothing
Regards.
Siva
Sadly that does not work either
Hi Mandy,
I found this link from 2011 in this community. May be this can give you some help.
How to Export Qlikview sheets as an image to Excel?
Regards
Burkhard
Nope as soon as I copyBitmap it fails