LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save data on spreadsheet on same spreadsheet after PC restart

Solved!
Go to solution

Hello friends,

 

I am saving my data in excel file using write measurment file of differnt sensor but when ever my PC restarts, Labview creates another file and save data in next file, i want that my VI should save data on first file after last data saved,

any one guid me how can i do that.

 

Thanks

asif  

0 Kudos
Message 1 of 8
(215 Views)

We cannot really help unless we know what the program does and how you are doing the file IO. (express VI, plain file tools, report generation, etc.)

 

Is the filename hardwired? Is it a "spreadsheet" file (plain ASCII delimited text) or an "excel" file (proprietary Microsoft format). Big difference!

 

With proper choices, You can always check if a certain file already exist and then open it for appending. Show us your code!


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 8
(207 Views)

@Asif138 wrote:

Hello friends,

 

I am saving my data in excel file using write measurment file of differnt sensor but when ever my PC restarts, Labview creates another file and save data in next file, i want that my VI should save data on first file after last data saved,

any one guid me how can i do that.

 

Thanks

asif  


  1. Stop using the Express VI's
    1. They are intended for those LabVIEW seminars sales pitches to show managers and other non-programmers how fast you can just throw something together in LabVIEW
    2. As you see they quickly become unusable in even the most simple application
  2. Use the "Write Delimited Spreadsheet" vi and set "append to file?: to True
    1. Remember this VI does not create an "Excel" file it creates a Tab Delimited Text file by default that any spreadsheet program can open
    2. Excel will have no problem opening this file type you can even give it a .txt extension 
    3. You can change the Delimiter to a Comma and make a Comma Separated Values (.csv) file if you want

fghjCapture.PNG

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 8
(203 Views)

@RTSLVU wrote:


How about "Engineer Ambivalently"?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 8
(153 Views)

Thanks for your swift replay

 

here i attached code and excel file on which data is stored.

My PC set to restart every morning at 8:05am and data is stored daily twice at 8am and 8pm.

when PC starts , VI create new file and saved data in new file.

 

Thanks

asif 

0 Kudos
Message 5 of 8
(141 Views)
Solution
Accepted by topic author Asif138

In the save express Vi you can select to append to file if the file exists. Have you tried that?

 

(why all the coercion dots? How exactly are you stopping the program?)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 8
(134 Views)

@billko wrote:

@RTSLVU wrote:


How about "Engineer Ambivalently"?


Oooo, I like that one too. 😛

 

Honestly the first time I saw NI's new slogan "Engineer Ambitiously" I read it as "Engineer Ambiguously". So in my mind that's what NI's slogan will always be.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 8
(115 Views)

Create a constant wiht the filename on it and labview will always save data on the same file. Select APPEND TO FILE on the configuration pannel of the Write to measurment file 

ROtakeCanada_0-1627580767150.png

 

0 Kudos
Message 8 of 8
(104 Views)