Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copy text box to xls

HI All,

I am quite familiar with exporting a chart to xls with the code below, but when I try to use this with a text object, it does not seem to work. My text object is ...

= 'text ' & today(2)

..but if I try and use the code below changing CH01 to TX01, it all goes wrong on the xls coming up with a previous copy / paste or cell reference or ?.

Has anyone any ideas please ?

set obj = ActiveDocument.getsheetobject("CH01")

obj.CopyTableToClipboard true

xlSheet.Range ("A1").Select

xlsSheet.Paste

Thanks in advance

Bob

1 Solution

Accepted Solutions
rubenmarin

Maybe you used that 'true' parameter, CopyTextToClipboard and CopyBitmapToClipboard doesn't have parameters, it should be only:

set obj = ActiveDocument.getsheetobject("TX01")

obj.CopyTableToClipboard

xlSheet.Range ("A1").Select

xlsSheet.Paste

I didn't tested, there is an API guide usually in C:\ProgramData\QlikTech\QlikView Documentation\Automation wich explains macro functions

View solution in original post

4 Replies
rubenmarin

Hi Nick,

Not sure CopyTableToClipboard works with Text objects, instead you can try CopyTextToClipboard to copy the text or CopyBitmapToClipboard to copy the the object as an image (with all his pros and cons)

Not applicable
Author

HI,

Unfortuantely that throws up a macro error of 'wring number of arguments or...'

😞

rubenmarin

Maybe you used that 'true' parameter, CopyTextToClipboard and CopyBitmapToClipboard doesn't have parameters, it should be only:

set obj = ActiveDocument.getsheetobject("TX01")

obj.CopyTableToClipboard

xlSheet.Range ("A1").Select

xlsSheet.Paste

I didn't tested, there is an API guide usually in C:\ProgramData\QlikTech\QlikView Documentation\Automation wich explains macro functions

Not applicable
Author

Thank you 🙂 removing the 'true' did it 😉