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: 

Create Excel sheet and write data in different sheet at same excel file

Hello,

 

I made Program that take Temperature from Excel file and every Temperature we need to measure the impedance of DUT, the Program work very well ,but program write all data i need in same sheet i need the program wirte every Temp with measurement in different sheet. 

 

regards

 

 

0 Kudos
Message 1 of 9
(5,447 Views)

Thank you I try it but it still the same 

0 Kudos
Message 3 of 9
(5,413 Views)

How did you try?

0 Kudos
Message 4 of 9
(5,411 Views)

Adding the worksheet is not enough.  You also need to make the new worksheet the current one by using Excel_Get_Worksheet. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 9
(5,394 Views)

@aputman wrote:

Adding the worksheet is not enough.  You also need to make the new worksheet the current one by using Excel_Get_Worksheet. 


According to the Help for Excel Add Worksheet VI, "The new worksheet becomes the current worksheet".  If you are using the Report Generation Toolkit (from which these VIs come), it is always useful to "look around" for other useful functions, such as Excel Rename Worksheet.  To learn how they work, drop them on a Block Diagram, right-click, and choose Help.

 

Saed -- you say you tried to do this, and it didn't work.  Please attach your code "that didn't work", and we can probably show you how to fix it.

 

Bob Schor

0 Kudos
Message 6 of 9
(5,383 Views)

Your statements don't match your code.  Your temperatures are generated by a loop and your Excel file is created as a new report.  I'm going to guess that you meant to use the word COLUMN and not SHEET.  Your report is an array of 3 results from your instrument but you failed to insert the Temperature string into the output.

 

Issues with your code:

  • The column header is written using Easy Table.vi to 0,0 but then included in the array of results
  • The results are written as DBL to 0,0 replacing your header with zeros
  • The results are written using Easy Table.vi starting at cell 0,0 with every loop iteration
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.
0 Kudos
Message 7 of 9
(5,374 Views)

Hallo

 

attached you can find the whole Project , i try to do it but it's not work 

0 Kudos
Message 8 of 9
(5,343 Views)

There are many issues/unknowns in your code, but there are 3 directly related to the Excel sheets.

  1. The number sheets inserted is determined by a local variable with a race condition. Just connect the wire
  2. Each sheet is over-written a fixed 7 times
  3. The entire Results file is over-written with every loop iteration.  Your final file will have data in only one sheet.
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.
0 Kudos
Message 9 of 9
(5,321 Views)