07-05-2024 06:20 AM
Hello, I would like you to help me create a VI that saves vectors into an Excel file that I have generated with another VI. For example, I have vectors of resistances, temperatures, and other individual elements like various types of errors. This data saving VI should save the arrays into an Excel file (each array in a separate column that I can name). Additionally, I would like it to save the date, time, and the user's name. Could you upload an example that accomplishes this?" thank's.
07-05-2024 06:26 AM
Hi John,
@John96Dee wrote:
Hello, I would like you to help me create a VI that saves vectors into an Excel file that I have generated with another VI. For example, I have vectors of resistances, temperatures, and other individual elements like various types of errors. This data saving VI should save the arrays into an Excel file (each array in a separate column that I can name). Additionally, I would like it to save the date, time, and the user's name. Could you upload an example that accomplishes this?"
Do you really need Excel or would a simple CSV file be sufficient?
What are "vectors" in LabVIEW? I guess you talk about 1D arrays…
How/where do you want to place the "name of your columns"?
You can create a 2D array of strings and place all your data in the correct elements of this array, then save the array using WriteDelimitedSpreadsheetFile…
07-05-2024 06:41 AM - edited 07-05-2024 06:51 AM
Csv in good; yes i have 3 different array 1D; In the file, each created column must have a name, for example 'temperature', 'resistances', 'error 1', 'error 2', etc. Can you show me an example VI? Thank you
in addition, I would like the operator's name, date, and time to be saved in the file.
i'm uploading an image of what I have done; I think there are many errors
07-05-2024 07:04 AM
Hi John,
@John96Dee wrote:
Csv in good; yes i have 3 different array 1D; In the file, each created column must have a name, for example 'temperature', 'resistances', 'error 1', 'error 2', etc. Can you show me an example VI?
You already provide that example with your image…
@John96Dee wrote:
I would like the operator's name, date, and time to be saved in the file.
Then you need to add those items to your CSV file: place some controls, and build the string arrays as required to write them to your CSV file…
@John96Dee wrote:
i'm uploading an image of what I have done; I think there are many errors
You know we cannot edit/debug/run images in LabVIEW, don't you?
Why do you "think" there might be errors? Why don't you know?
Why don't you debug your VI to find those errors (if they exist)…
07-05-2024 10:42 AM
ok if you want, i upload the VI. Is my firt time with saving data and i try to use my vi but it give me error n.7 i dont know solve it.
07-05-2024 10:55 AM
Hi John,
@John96Dee wrote:
i try to use my vi but it give me error n.7 i dont know solve it.
Which filepath do you use?
As soon as I use valid values for path and "Utente" your VI works without errors…
You forgot to add controls for your other needed data (username, etc.).
But with your VI you know how to
Now you just need to append some more data! (And implementing error handling would help, too.)
07-07-2024 12:15 PM - edited 07-07-2024 12:23 PM
Here's one possible cleaned up version (I probably would make the time format a bit nicer, though).