From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy an excel worksheet from one workbook to another

Hi All,

I have seen this example of ActiveX work which would create a copy of a worksheet in the same worksheet. I have tried to use the same theory to copy a worksheet from one workbook to another but it gave an error( error code: -2147352565). If you are into ActiveX then please help me on this as i don't have much experience in this field of activeX.

 

vattic_ASLK

0 Kudos
Message 1 of 7
(6,381 Views)

Hi:)

 

IF you read this and this and this, you should get some information about Excel and ActiveX. The stuff you're using has been converted into something called "The free Excel Toolkit". 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 2 of 7
(6,376 Views)

Thanks Even, I will try to take something out of those threads...

0 Kudos
Message 3 of 7
(6,362 Views)

Hi vattic,

 

I just coded something like this : It works exactly the same way if the copy stays in the same file or not.

 

Hope it helps!

Message 4 of 7
(6,328 Views)

Your code opens an Excel file, duplicates Sheet1 in the workbook, then re-opens the same file in another instance of Excel and attempts to rename and move the duplicated sheet.  I suggest that you try saving the modified file before you re-open it.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 5 of 7
(6,318 Views)

The post is a bit old but I faced the same issue and it took me 2 days to figure it out. I'm sick and tired to read multiple post that are not related to the original question or that tells you to buy the report generation toolkit!!!!

 

The question how to move one spreadsheet from one excel file to another, the attached vi gives you a solution!

 

The vi was build using labview 8.0.

 

I can't seem to be able to attach any vi (NI website gies me an error that my vi are corrupt) , so I just attached the screenshot of the diagram. I hope it will help

Message 6 of 7
(5,986 Views)

It works. Thank you, Valralf.

0 Kudos
Message 7 of 7
(5,932 Views)