LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pasting values only Excel

Solved!
Go to solution

Hi,

 

I am trying to paste some values from one worksheet in excel to another. I have no issues pasting the cells as is, the problem is, the cells which I copy have formulas in them to calcute some information for me. I would like to paste the values only. In excel you would do this by Copy --> Paste Special --> Values. I made a macro and tried to fallow it word by word. I got stuck when the paste special options surfaced. I have attached the image I hope it helps. If not simply ask for a VI and I will gladly make a sample vi.

0 Kudos
Message 1 of 19
(5,567 Views)
I assume you are looking for the value 'xlPasteValues'.  If so, make a property node of the XlPasteTypes class and select the property 'xlPasteValues'.  You can find the other values similarly.
Message 2 of 19
(5,550 Views)
Nice! I will give that a shot and update this thread with problems if I have any.
0 Kudos
Message 3 of 19
(5,546 Views)
Solution
Accepted by topic author MrSafe
Actually, you can just right-click on the "Paste" element, and select Create->Constant. This should create an enum constant where you can select the appropriate value.
Message Edited by smercurio_fc on 07-21-2009 03:36 PM
Message 4 of 19
(5,544 Views)
Holy ...... Thanks man.
0 Kudos
Message 5 of 19
(5,541 Views)

I am recieving this error now. I can get it to work here and there but this error comes up almost every time.

 

 

"Error -2147417848 occurred at The object invoked has disconnected from its clients."

 

Hex Code = 80010108

0 Kudos
Message 6 of 19
(5,512 Views)
Without seeing some code, all that I can do is point you to this Microsoft KB article.
0 Kudos
Message 7 of 19
(5,508 Views)

File is attached.

 

 

**update** seems in my haste i left some files out. Sorry

Message Edited by MrSafe on 07-21-2009 05:54 PM
Download All
0 Kudos
Message 8 of 19
(5,506 Views)
Here is the last file needed.
0 Kudos
Message 9 of 19
(5,503 Views)

Are you trying to run the VIs independently? It seems that way since each one is opening and closing Excel. You should only be opening and closing Excel once. Thus, you should be carrying out all your operations within one VI hierarchy. Meaning either all in the same VI, or you can use subVIs, and pass the references through the subVIs.

 

Also, when I opened up the VIs I found property nodes and invoke nodes with some parameters not wired. I can only assume it's because you're using a different version of Excel. Microsoft changes the Excel object model with each version.

0 Kudos
Message 10 of 19
(5,475 Views)