LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filename to delimited spreadsheet

Solved!
Go to solution

Hi! I'm working on a project to get frequent readings and would like to sort the data based on the date and time in the excel sheet. I  am using delimited spreadsheet and I tried building a filename but came up with error. It would be really great if anyone can suggest an idea! 🙂 Thank you very much!Capture.JPG

0 Kudos
Message 1 of 19
(4,681 Views)

Hi raghav,

 

supply a file path for that FileOpen function!

 

but came up with error.

Which error?

What did the error message say?

Why do you attach just an image - but no VI/snippet?

Best regards,
GerdW


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

As Gerd said, you have no filename connected to the Open file function, so i bet your error is "Not a path", right?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 19
(4,645 Views)

None of the code on your truncated picture shows any "building" of any file name, thus the picture seems unrelated to the problem. Please show us the relevant code instead. 

(I am sure you could refactor so the sequence structure can be eliminated. What's the difference between "file path 2” and "file path 3"?)

0 Kudos
Message 4 of 19
(4,625 Views)

I like to have the file names auto generated and usually do something like this:

patheCapture.PNG 

This creates a file name like: HiQ_Raw_Data_Tuesday_June_26_2018.txt

(full path C:\HiQ_Data\HiQ_Raw_Data_Tuesday_June_26_2018.txt)

========================
=== Engineer Ambiguously ===
========================
Message 5 of 19
(4,621 Views)

@RTSLVU wrote:

I like to have the file names auto generated and usually do something like this:


I do something similar, except I just use the Format Date/Time String function and I format it to be YYYY-MM-DD and put the time in there too.  This way, it auto-sorts by date/time.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 19
(4,614 Views)

@GerdW wrote:

Hi raghav,

 

supply a file path for that FileOpen function!

 

but came up with error.

Which error?

What did the error message say?

Why do you attach just an image - but no VI/snippet?


Hi! I did supply a file path, but it overwrites for every run of the program. So I kept it unwired and created a file everytime. I have attached the VI with this message. 🙂 Sorry I forgot to attach it before.

0 Kudos
Message 7 of 19
(4,594 Views)

@Yamaeda wrote:

As Gerd said, you have no filename connected to the Open file function, so i bet your error is "Not a path", right?

/Y


Yep, but before that I did try giving an existing text file path to the program. But like I told Gerd, it's being overwritten for every run of the program. 😞 I would like to save it as a new file everytime, so I removed the path and made it open the dialog box everytime.
0 Kudos
Message 8 of 19
(4,592 Views)

@altenbach wrote:

None of the code on your truncated picture shows any "building" of any file name, thus the picture seems unrelated to the problem. Please show us the relevant code instead. 

(I am sure you could refactor so the sequence structure can be eliminated. What's the difference between "file path 2” and "file path 3"?)


Hi, I've attached the code with this message. Sorry I forgot to add it previously. The names are just automatic filenames given by LabVIEW. I could not make it save as a different document everytime when I wired the filepath, so I kept it unwired as it would open the dialog box everytime and ask the filename to be created, but it's pretty tedious, so I'm looking for an alternative with a predefined new filename. 🙂

0 Kudos
Message 9 of 19
(4,590 Views)

Hi raghav,

 

when you want to append new data to the end of your file you should set the file position to the end instead of the start.

Seems reasonable, don't you think!?

 

(Judging from the image in your first message as I cannot open your LV2018 VI.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 19
(4,586 Views)