LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save File Automatically

Dear Sir

 

            I tried to save file Excel automatically with timing name, but still not work.

            Anybody can advise me, how to solve the problem.

 

Thank you.

Download All
0 Kudos
Message 1 of 8
(2,891 Views)

Hi pic,

 

  1. Don't use the colon (":") in filenames…
  2. Provide a folder to BuildPath function…
  3. Debug: Which error do you get?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,869 Views)

As usual, GerdW's eyes are sharper than mine.  I was looking for the Colon that Gerd mentioned, and wondering why you didn't specify a Folder when you built your path name.

 

I really dislike using Date/Time as the basis for File Names -- it is "User-UnFriendly", in my opinion.  I notice that you realized you can't save the date as 19/jul/22 (and used 19.jul.22), but you also can't say 08:39 for the time, but can say 0839, or 08,39, instead.

 

But why not use a less confusing name?  If time-of-occurance is an important parameter, save it in the file.  A format I often use is a short name ("Expt-5") followed by sequence numbers in a fixed format (e.g. "Expt-5 003") with an appropriate trailing extension ("Expt-5 003.xlsx").  Note that LabVIEW does a pretty good job knowing that the last dotted name-part is the Extension, so you could also name it Expt-5.003.xlsx.

 

Bob Schor

0 Kudos
Message 3 of 8
(2,815 Views)

I admit it can be a little long but I really like using the Date-Time in my filenames.  I usually go for: XXXXX-YYYYMMDDHHMM.xxx where XXXXX is my serial number, test iteration or whatever and .xxx is the appropriate extension.  (Pardon the watermark but I'm still waiting for management to license my LabVIEW.)

DateTimeSnippet.png

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 8
(2,789 Views)

To the tune of "You Say Po-tay-to, and I Say Po-tah-to"

   You like Long File Name, and they all have Dates,

   I like Short File Names that Have what it Takes,

   Long Date Names, Short "Takes" Names,

   No Fake Names, or Nick-Names,

   LabVIEW Brings the Whole Thing Off.

 

Bob Schor

0 Kudos
Message 5 of 8
(2,776 Views)

Smiley Surprised Smiley LOL

Bob, I think you've had too much or too little coffee today...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 8
(2,765 Views)

 

Coffee?   Or something...

Smiley Wink

 

Anyway, I often embed date/time info into filenames for a lot of the test stations here too.  Most fixtures create filenames based on test metadata plus YYYYMMDD_HHMMSS timestamp info.  Then multiple runs on the same UUT can still end up with unique filenames that can be sorted with some rationality in Explorer.  (And filesystem timestamps do not necessarily stay constant, such as when users post-edit a file to fix some header info they forget to enter correctly before running the test.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 8
(2,751 Views)

Thank you every body, I got it.

0 Kudos
Message 8 of 8
(2,741 Views)