LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to spreadsheet file common path dialog

Solved!
Go to solution

Hi guys,

 

I am facing a road block here. 

 

I am currently using Create File (unwired file path) so that the user can input the file name "test.txt" to create the txt file. No problem here. 

 

However, I want this newly created text file to be my file path to my Write to Spreadsheet File.

 

Please see attached photo.

 

Help ! Kudos and thanks !

0 Kudos
Message 1 of 24
(3,919 Views)

didnt work

 

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 2 of 24
(3,910 Views)

Hi poker,

 

two ways:

check.png

Either close the file to get the path or use the file dialog express VI instead...

 

@Koen:

When the path is provided as "a:" (as is in the given example) then WriteSpreadsheetFile will give an error or does not provide the functionality as requested...

 

General hint:

Using WriteSpreadsheetFile is a quick way to write CSV files, but has the disadvantage of not providing error I/O connections. And you can't prevent error dialogs generated inside this function... It's (most often) quite easy to use simple file functions in conjunction with ArrayToSpreadsheetString!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 24
(3,909 Views)
Solution
Accepted by topic author pokerprof
Why not use Build path? and then send it to Write to spreadsheet file.
Thanks
uday
Message 4 of 24
(3,906 Views)

Hi Uday,

 

did you test your suggestion? OpenFile outputs a file reference, not a path...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 24
(3,898 Views)
I mean't use the new file name as string to the build path and the base path as folder path.
Can't we do that way?
Thanks
uday
0 Kudos
Message 6 of 24
(3,882 Views)

Thank you for the input guys.

 

I have solved it using Build Path.

 

This is how I did it:

 

Prompt user input. Output string to the Build Path. The appended path string goes to the file path of Create File. I also create a local variable of the appended path string and it goes to Write to Spreadsheet File.

 

There you go. Thank you and kudos !

0 Kudos
Message 7 of 24
(3,874 Views)
Hi pokerprof,

Most welcome it helped.
Thanks
uday
0 Kudos
Message 8 of 24
(3,865 Views)

Hi poker,

 


I also create a local variable of the appended path string and it goes to Write to Spreadsheet File.


 

Why do you need a local variable for that purpose?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 24
(3,862 Views)

Hi,

 

Cause the write to spreadsheet is inside a while loop and many other case structures. So I guess it is easier to just have a local variable to do the job.

0 Kudos
Message 10 of 24
(3,846 Views)