Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can any one of u pls explain me how to export the Qlikview sheets as an image to Excel?
Hi,
u can try this one, I think this what u expecting
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.ActiveSheet.CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
end sub
Thanks & Regards
Hi,
Just right click on the object which you want to export as an image then
Copy to Clipboard---->Image
Go to msexcel and simply paste it will paste as an image.
Thank & Regads
Hi Upendra,
Actually i need to export the whole sheet as an image to Excel. For example, when i click a button, all the sheets in the Qlikview file should be exported to the Excel as an image. I think this will be possible through macros. So can u pls help me how to write macro for this?
Hi,
you can write
sub Test()
ActiveDocument.Sheets("Main Sheet").ExportBitmapToFile "C:\MyImage.bmp"
end Sub
Thanks & Regards
Hi,
I tried the macro what u have mentioned. Using this macro i get the image as a bitmap file. But my question is different. I need to export the sheet as an image to the excel file. Pls help me how to do this.
Thanks
set obj = ActiveDocument.GetSheetObject("CH703")
obj.ExportEx "E:\Qlikview\Prima\PPT\Department_Loadinng.xls",5
set obj = ActiveDocument.GetSheetObject("CH704")
obj.ExportEx "E:\Qlikview\Prima\PPT\Top_5_Project.xls",5
set obj = ActiveDocument.GetSheetObject("CH705")
obj.ExportEx "E:\Qlikview\Prima\PPT\0HrsProject.xls",5
Hi,
u can try this one, I think this what u expecting
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.ActiveSheet.CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
end sub
Thanks & Regards
Hi Upendra,
Thanks for the reply. i tried this macro and it is working fine. can u pls help me if i need to export two or more sheets using a single button.
Please look in to the macro that i have given:
sub
test2
set
XLApp = CreateObject("Excel.Application")' Define Object
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
"Main"
).CopyBitmapToClipboard
"A1"
)'Paste data into cell
set
XLSheet = XLDoc.Worksheets(2)'Select sheet where data should be pasted
"Sheet1"
).CopyBitmapToClipboard
"A1"
)'Paste data into cell
end
sub
Hi Upendra,
Thanks for the reply. i tried this macro and it is working fine. can u pls help me if i need to export two or more sheets using a single button.
Please look in to the macro that i have given:
sub test2
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("Main").CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
set XLSheet = XLDoc.Worksheets(2) 'Select sheet where data should be pasted
ActiveDocument.Sheets("Sheet1").CopyBitmapToClipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
end sub
Check if the attached example help.
Thanks