Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to copy/paste without using clipboard?

Hi,

Apart from saying there is a problem in using the clipboard you never quite
got around to telling us what that problem is.

Anyway, this doesn't use the clipboard

Sheet2.Range("A1:a100").copy Sheet1.Range("B1")


Mike


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default How to copy/paste without using clipboard?

Probably a VBA solution would help..

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to copy/paste without using clipboard?


Hmm,

Forget that, it does use the clipboard.


"Mike H" wrote:

Hi,

Apart from saying there is a problem in using the clipboard you never quite
got around to telling us what that problem is.

Anyway, this doesn't use the clipboard

Sheet2.Range("A1:a100").copy Sheet1.Range("B1")


Mike


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

Hi Mike and Jacob, thank you very much for quick responses.

Mike, I'm sorry I wasn't clear enough on my problem. The problem is that,
while Excel is working in background generating reports, user working on
foreground (e.g. writing emails or word documents) cannot use copy/paste.
Sometimes, you get wrong thing pasted if the Excel template was doing
Selection.Copy, and sometimes you don't get anything pasted if Excel was
doing Range.Copy (which clears everything in the clipboard right away). There
is also a potential that wrong thing is pasted to the Excel report. Just a
timing issue.

As I said in my initial post, Range.Copy does use clipboard - it just clears
the clipboard. You can try it out easily. Microsoft's document on that
function is wrong.

Jacob, I'm using VBA code to do that. In the code both Selection.Copy and
Range.Copy are used right now. But if there is any copy function whick
doesn't interfere with the clipboard, I would refactor my VBA code to use
that.

"Jacob Skaria" wrote:

Probably a VBA solution would help..

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default How to copy/paste without using clipboard?

To the OP: Use the Office Clipboard instead. See
http://blogs.techrepublic.com.com/msoffice/?p=544

Mike: I think the problem is either that the worksheet might have
sensitive data on it, which when copied, is available publicly via the
Windows clipboard (hence the comment by the OP: "the content in
Windows clipboard which can be shared by other applications"), or that
Excel VBA is running while the user completes other tasks, and the
clipboard is unavailable to that user because it is being used by VBA
(hence the comment by the OP: "which makes the Window clipboard
unusable for the user working in foreground.")

I'm curious to know which is correct.

--JP

On Oct 2, 2:45*pm, Mike H wrote:
Hi,

Apart from saying there is a problem in using the clipboard you never quite
got around to telling us what that problem is.

Anyway, this doesn't use the clipboard

Sheet2.Range("A1:a100").copy Sheet1.Range("B1")

Mike



"Ming" wrote:
I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.


There are two ways you can copy/paste data around in Excel.


One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.


There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.


There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.


Anybody is aware of workaround for this problem?- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default How to copy/paste without using clipboard?

To copy values try the below

Sheets("Sheet2").Range("A11:B15") = Sheets("Sheet1").Range("A1:B5").Value

OR

Dim rngTemp As Range
Set rngTemp = Sheets("Sheet1").Range("A1:B5")
Sheets("Sheet2").Range("A11").Resize( _
rngTemp.Rows.Count, rngTemp.Columns.Count) = rngTemp.Value


If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

Hi Mike and Jacob, thank you very much for quick responses.

Mike, I'm sorry I wasn't clear enough on my problem. The problem is that,
while Excel is working in background generating reports, user working on
foreground (e.g. writing emails or word documents) cannot use copy/paste.
Sometimes, you get wrong thing pasted if the Excel template was doing
Selection.Copy, and sometimes you don't get anything pasted if Excel was
doing Range.Copy (which clears everything in the clipboard right away). There
is also a potential that wrong thing is pasted to the Excel report. Just a
timing issue.

As I said in my initial post, Range.Copy does use clipboard - it just clears
the clipboard. You can try it out easily. Microsoft's document on that
function is wrong.

Jacob, I'm using VBA code to do that. In the code both Selection.Copy and
Range.Copy are used right now. But if there is any copy function whick
doesn't interfere with the clipboard, I would refactor my VBA code to use
that.

"Jacob Skaria" wrote:

Probably a VBA solution would help..

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

Hi JP, the problem with using Office clipboard is that it alreays shares the
last item with the Windows clipboard. Essentially, Windows clipboard is also
altered when you copy anything to office clipboard.

My problem is primarily that user in foreground cannot use their clipboard
as usual (Who can give up the copy/paste nowadays?). And, it would be a big
issue if Excel gets wrong data pasted into the report. Data security is not a
problem for me.





"JP" wrote:

To the OP: Use the Office Clipboard instead. See
http://blogs.techrepublic.com.com/msoffice/?p=544

Mike: I think the problem is either that the worksheet might have
sensitive data on it, which when copied, is available publicly via the
Windows clipboard (hence the comment by the OP: "the content in
Windows clipboard which can be shared by other applications"), or that
Excel VBA is running while the user completes other tasks, and the
clipboard is unavailable to that user because it is being used by VBA
(hence the comment by the OP: "which makes the Window clipboard
unusable for the user working in foreground.")

I'm curious to know which is correct.

--JP

On Oct 2, 2:45 pm, Mike H wrote:
Hi,

Apart from saying there is a problem in using the clipboard you never quite
got around to telling us what that problem is.

Anyway, this doesn't use the clipboard

Sheet2.Range("A1:a100").copy Sheet1.Range("B1")

Mike



"Ming" wrote:
I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.


There are two ways you can copy/paste data around in Excel.


One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.


There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.


There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.


Anybody is aware of workaround for this problem?- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

Hi Jocab, this is the workaround I'm trying to do now. But it is painfully
slow. Plus, it's difficult to do everything what copy/paste offers (e.g. I
didn't figure out how to duplicate formula with relative reference of cells,
and how to duplicate merged cells).

"Jacob Skaria" wrote:

To copy values try the below

Sheets("Sheet2").Range("A11:B15") = Sheets("Sheet1").Range("A1:B5").Value

OR

Dim rngTemp As Range
Set rngTemp = Sheets("Sheet1").Range("A1:B5")
Sheets("Sheet2").Range("A11").Resize( _
rngTemp.Rows.Count, rngTemp.Columns.Count) = rngTemp.Value


If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

Hi Mike and Jacob, thank you very much for quick responses.

Mike, I'm sorry I wasn't clear enough on my problem. The problem is that,
while Excel is working in background generating reports, user working on
foreground (e.g. writing emails or word documents) cannot use copy/paste.
Sometimes, you get wrong thing pasted if the Excel template was doing
Selection.Copy, and sometimes you don't get anything pasted if Excel was
doing Range.Copy (which clears everything in the clipboard right away). There
is also a potential that wrong thing is pasted to the Excel report. Just a
timing issue.

As I said in my initial post, Range.Copy does use clipboard - it just clears
the clipboard. You can try it out easily. Microsoft's document on that
function is wrong.

Jacob, I'm using VBA code to do that. In the code both Selection.Copy and
Range.Copy are used right now. But if there is any copy function whick
doesn't interfere with the clipboard, I would refactor my VBA code to use
that.

"Jacob Skaria" wrote:

Probably a VBA solution would help..

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default How to copy/paste without using clipboard?

I'm not going to debate copy/paste usage. My only other suggestions
are workarounds:

1) Can you do something else while Excel is processing?
2) Can you rewrite your code so it runs better/faster?
3) Can you run the code from a dedicated "Reports Only" machine?

--JP

On Oct 2, 3:43*pm, Ming wrote:
Hi JP, the problem with using Office clipboard is that it alreays shares the
last item with the Windows clipboard. Essentially, Windows clipboard is also
altered when you copy anything to office clipboard.

My problem is primarily that user in foreground cannot use their clipboard
as usual (Who can give up the copy/paste nowadays?). And, it would be a big
issue if Excel gets wrong data pasted into the report. Data security is not a
problem for me.



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default How to copy/paste without using clipboard?

Hi JP, the "workaround" we current have is to put a note in the release note
saying "don't use windows clipboard while xxx is generating report in
background". And I already hear people responding "this is unacceptable".

1) Can you do something else while Excel is processing?
Yes, you can do anything else but just don't use windows clipboard while
Excel is generating reports in background which could take hours.

2) Can you rewrite your code so it runs better/faster?
Yes, this is always what we try to do. But it simply takes time to generate
and print the reports.

3) Can you run the code from a dedicated "Reports Only" machine?
This is another advice we give to user, but it'd odd to many people - what?
I need another machine for that?

"JP" wrote:

I'm not going to debate copy/paste usage. My only other suggestions
are workarounds:

1) Can you do something else while Excel is processing?
2) Can you rewrite your code so it runs better/faster?
3) Can you run the code from a dedicated "Reports Only" machine?

--JP

On Oct 2, 3:43 pm, Ming wrote:
Hi JP, the problem with using Office clipboard is that it alreays shares the
last item with the Windows clipboard. Essentially, Windows clipboard is also
altered when you copy anything to office clipboard.

My problem is primarily that user in foreground cannot use their clipboard
as usual (Who can give up the copy/paste nowadays?). And, it would be a big
issue if Excel gets wrong data pasted into the report. Data security is not a
problem for me.


  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default How to copy/paste without using clipboard?

Yes; you will have to deal with that (formats,formulas,borders etc;) one by
one

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

Hi Jocab, this is the workaround I'm trying to do now. But it is painfully
slow. Plus, it's difficult to do everything what copy/paste offers (e.g. I
didn't figure out how to duplicate formula with relative reference of cells,
and how to duplicate merged cells).

"Jacob Skaria" wrote:

To copy values try the below

Sheets("Sheet2").Range("A11:B15") = Sheets("Sheet1").Range("A1:B5").Value

OR

Dim rngTemp As Range
Set rngTemp = Sheets("Sheet1").Range("A1:B5")
Sheets("Sheet2").Range("A11").Resize( _
rngTemp.Rows.Count, rngTemp.Columns.Count) = rngTemp.Value


If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

Hi Mike and Jacob, thank you very much for quick responses.

Mike, I'm sorry I wasn't clear enough on my problem. The problem is that,
while Excel is working in background generating reports, user working on
foreground (e.g. writing emails or word documents) cannot use copy/paste.
Sometimes, you get wrong thing pasted if the Excel template was doing
Selection.Copy, and sometimes you don't get anything pasted if Excel was
doing Range.Copy (which clears everything in the clipboard right away). There
is also a potential that wrong thing is pasted to the Excel report. Just a
timing issue.

As I said in my initial post, Range.Copy does use clipboard - it just clears
the clipboard. You can try it out easily. Microsoft's document on that
function is wrong.

Jacob, I'm using VBA code to do that. In the code both Selection.Copy and
Range.Copy are used right now. But if there is any copy function whick
doesn't interfere with the clipboard, I would refactor my VBA code to use
that.

"Jacob Skaria" wrote:

Probably a VBA solution would help..

If this post helps click Yes
---------------
Jacob Skaria


"Ming" wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default How to copy/paste without using clipboard?

Have the PC run the reports after hours.

Ming wrote:

I'm using Excel to generate some reports in background which could take long
time. The problem is that a lot of copy/paste is used in the template for
generating those reports which makes the Window clipboard unusable for the
user working in foreground.

There are two ways you can copy/paste data around in Excel.

One is Selection.Copy and ActiveSheet.Paste. It copies the content in
Windows clipboard which can be shared by other applications. I can understand
why this function uses clipboard.

There second way is to use Range.Copy [Destination] to copy and paste in one
function call. This function also uses clipboard. Actually, it copies into
clipboard and clears it right away. So, the content can't be shared at all.
Therefore, there is really no reason to use the clipboard. Sadly, this is the
way it behaves.

There is another similar function Worksheet.Copy [Destination] which doesn't
use clipboard.

Anybody is aware of workaround for this problem?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste not functioning, think clipboard problem Jane, UK Excel Worksheet Functions 1 July 21st 08 01:31 PM
clipboard copy & paste SAGknot Excel Discussion (Misc queries) 1 June 12th 07 01:36 PM
WHY IS THE OFFICE CLIPBOARD NOT LETTING ME COPY AND PASTE? FtWorthDave Excel Discussion (Misc queries) 3 February 13th 07 09:54 PM
Copy / Paste Function & the Office Clipboard Karen Excel Discussion (Misc queries) 2 February 17th 05 02:41 AM
Copy / Paste Function & the Office Clipboard Karen Excel Discussion (Misc queries) 0 February 16th 05 06:41 PM


All times are GMT +1. The time now is 01:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"