LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy the content of a sheet in excel and paste it in a new sheet.

How can I copy the content of the first sheet in excel and paste it in a newly created sheet. Both sheets have specific names (not sheet1 and sheet2).
0 Kudos
Message 1 of 3
(3,673 Views)
To copy the entire contents to the new sheet:
Select the Target sheet by name using property Sheets->Item("Target")
Convert target to WorkSheet
Wire target's WorkSheet->Range("A1") to specify destination
Use Sheets->Item("Source") to select the source sheet
Convert source to WorkSheet
Wire source to property WorkSheet->UsedRange
Wire to method Range->Copy, wire target range to Desination input
Note that no Paste function is required.
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 2 of 3
(3,673 Views)
You need to get the cell values for the one sheet and then write those same values to the second. You need to get a reference to a paticular sheet, and then use the cell>>range.value to get the values for the sheet. The value property can be either read or write, so you could then write the same data to a different sheet following the same methods.
0 Kudos
Message 3 of 3
(3,673 Views)