Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, all!
It has long been observed that sometimes the most common simple VB macros to work through the clipboard in different locations, or an error or rarely inserts incorrect data (for example, instead of the text that is ????? question marks).
Again, that makes me angry sometimes works, sometimes not. That is the reason I can not understand yet.
As I understand it, I is not one, there is at least an understanding of the causes? Or are other ways to work complex algorithms and complex formats in excel but not through the clipboard?
The reasons for errors by copy + paste per clipboard are rather rarely but if they occur they are very difficult to identify and to resolve. I think that in the most cases the OS will cause the errors because the clipboard.exe belonged to them and qlikview used this feature like any other programs does.
Take a look here to understand the problem more clearly and which things could be tried to resolve the problem:
Re: Failed to copy to clipboard
The following approach will completely avoid the copy-topic because the qlik-objects will be read cell for cell and could be write in the same way in excel:
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
- Marcus
The reasons for errors by copy + paste per clipboard are rather rarely but if they occur they are very difficult to identify and to resolve. I think that in the most cases the OS will cause the errors because the clipboard.exe belonged to them and qlikview used this feature like any other programs does.
Take a look here to understand the problem more clearly and which things could be tried to resolve the problem:
Re: Failed to copy to clipboard
The following approach will completely avoid the copy-topic because the qlik-objects will be read cell for cell and could be write in the same way in excel:
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
- Marcus
Thank you we will think
In this topic Re: copy clipboard failed Thank you, these days have shown that you are absolutely right
I have noticed that following statements are missing which often avoid problems:
qvDoc.GetApplication.WaitForIdle 'wait until all qv calculations are finsih
XLDoc.sheets(YourSheet).Activate 'activate the sheet before using