Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QlikView Experts!
Newbie here back with question:
I have this script to copy and read the clipboard text to have further process.
in VBScript I wrote:
Sub ProcessClipboard
ActiveDocument.GetSheetObject("TX01").CopyTextToClipboard
Dim x
x = GET_CLIPBOARD_VALUE
End Sub
How can I set X with clipboard value in QV?
Please help. Thank you.
A
Hi Adrian:
I'm not sure how to read the contents from Clipboard using VBS + Qlikview. However, in case of straight table, you can read the data by rows and columns with the following script (Source: Qlikview API Guide)
Sub ReadStraightTable
Set Table = ActiveDocument.GetSheetObject( "CH01" )
For RowIter = 0 to table.GetRowCount-1
For ColIter = 0 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
Msgbox(cell.Text)
Next
Next
End Sub
There should be a better/easy way, may be I'm not familiar at this moment
Thanks,
Narasimha K
Use GetText instead of CopyTexttoClipboard, following is the snippet:
Sub ProcessClipboard
Dim x
x = ActiveDocument.GetSheetObject("TX01").GetText
msgbox x
End Sub
Regards,
Narasimha K
Hi Narashima!
Thanks that is really helpful.
But what if the source object is a STRAIGHT TABLE with object ID "CH04"
I got this:
Object doesn't support this property or method: 'ActiveDocument.GetSheetObject("CH04").GetText'
Please help.
Thank you.
Hi Adrian:
I'm not sure how to read the contents from Clipboard using VBS + Qlikview. However, in case of straight table, you can read the data by rows and columns with the following script (Source: Qlikview API Guide)
Sub ReadStraightTable
Set Table = ActiveDocument.GetSheetObject( "CH01" )
For RowIter = 0 to table.GetRowCount-1
For ColIter = 0 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
Msgbox(cell.Text)
Next
Next
End Sub
There should be a better/easy way, may be I'm not familiar at this moment
Thanks,
Narasimha K
Can't thank you enough Narasimha.
Thank you!
Hi,
How to get if the sourceobject is straight table with object ID "CH28". Then Msgbox() wont work right.
Sub ReadStraightTable
Set Table = ActiveDocument.GetSheetObject( "CH28" )
For RowIter = 0 to table.GetRowCount-1
For ColIter = 0 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
Msgbox(cell.Text)
Next
Next
End Sub
How to get if source object is line chart.
Thanks,
Sahithya