Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Macro to copy a cell value and paste it to the clip board


Hello Everybody,

I want to create a macro to copy the cell value (on select) from the table box and paste it to the clipboard.

Please suggest.

Thanks In Advance

Sonali

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

ActiveDocument.GetSheetObject("CH01").CopyValuesToClipboard

Will not work in WebView (Ajax), only in plugin.

View solution in original post

8 Replies
Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

why do you need a macro when you can right-click and select copy->cell value?

I can walk on water when it freezes
Highlighted
Not applicable

Re: Macro to copy a cell value and paste it to the clip board

Hi Ali,

Yes, there is the option of coping a value, right click- copy- cell value- paste

But I want to reduce the number of actions performed. Hence I want to create a trigger so that when I click a field value it will automaticall copy the selected value.

Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

ActiveDocument.GetSheetObject("CH01").CopyValuesToClipboard

Will not work in WebView (Ajax), only in plugin.

View solution in original post

Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

but you need to pay attention that macros do not work in browsers like google Ghrome and in IE unless you have the IE plug in installed

I can walk on water when it freezes
Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

>but you need to pay attention that macros do not work in browsers like google Ghrome and in IE unless you have >the IE plug in installed

This is incorrect.

All macros does not work in Ajax, but a lot of them.

CopyValuesToClipboard does not work since you can't access the clipboard in Ajax.

Highlighted
Not applicable

Re: Macro to copy a cell value and paste it to the clip board


Hi Jerry,

Thanks for your help..

I am using IE plug In for this work but still it is not working.

What will be the actual code?

ActiveDocument.GetSheetObject("CH01").CopyValuesToClipboard

Or do I have to create a variable and pass this variable under Sub  End Sub

Highlighted
Partner
Partner

Re: Macro to copy a cell value and paste it to the clip board

It should work if your tablebox has the ID CH01.

I tested it in Developer and it worked fine, can't try it in plugin since we only use Ajax as client.

Highlighted
Contributor
Contributor

Re: Macro to copy a cell value and paste it to the clip board

Hi, Thanks for the solution, can you please advise a way by which I can copy data with Header. I used below code

Sub Copy

ActiveDocument.GetSheetObject("CH01").CopyValuesToClipboard

End sub