Hello,
I'm having a few issues when running a macro:
1. I'm having trouble getting Qlikview to copy an image from a sheet that is not active and paste it into Excel using a macro. It is pasting a blank image into worksheet #2.
2. I'd like to be able to Label the Excel Worksheet with a specific name.
3. When copying the table into a worksheet I'd like it to not wrap text.
Here is the script that I'm using:
sub test
set XLApp = CreateObject("Excel.Application") ' Define Object
XLApp.Visible = True 'Visible set as true
set XLDoc = XLApp.Workbooks.Add 'Open new workbook
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
ActiveDocument.Sheets("SH16").CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
set XLSheet = XLDoc.Worksheets(2) 'Select sheet where data should be pasted
ActiveDocument.Sheets("SH10").CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
set XLSheet = XLDoc.Worksheets(3) 'Select sheet where data should be pasted
set table = ActiveDocument.GetSheetObject("CH131") 'Select table to copy to sheet
table.CopyTableToClipboard true
XLSheet.Paste XLSheet.Range("A1")
end sub
Thanks,
- Peter