11-25-2012 08:56 PM
Hello everyone. I just found that "Comments and Array to txt" VI in another forum, and i have problems to write in a excel file. When i run the VI, it gives me that error :
How to handle that problem ?
Thanks in advance
Oesen
11-25-2012 10:23 PM
What is the value you set in the file path input? which file are you writing to?
11-25-2012 10:33 PM
Hmm.. Value ?.. what do you exactly mean with that ?. I will write to Microsoft Excel
11-25-2012 10:41 PM - edited 11-25-2012 10:48 PM
in your vi, on the front panel, there is a file path input. what is the file path you have selected? you seem to be writing to the file inside program files folder. you might not have user rights to modify files inside that path.
try saving the file on the desktop and check if it saves correctly.
edit: also, if you want to write to a excel file, your file name should have an extension '.xls'. however, in your error message, you seem to be writing data to a executable.
11-25-2012 10:58 PM
Yep, the Error tells you the file name. You are trying to write to the actual Excel application executable. As suggested, change your filename and extension to an Excel document, e.g., .xls.
11-26-2012 05:38 AM
Thanks for the answers
I have copied a Excel document ("xlsx") to the desktop, and chosen this document in the file path. Now it only runs the VI 1/2 seconds and automatically stops the VI again. I can't open the Excel document after that procedure, is says that the file type or file format is invalid.
11-26-2012 05:44 AM
try using the file extension .csv (can be created in excel by save as then select format as ms-dos comma seperated), xls (and xlsx) files have a load of header information you wont be using if you are handling the file with write to spreadsheet.
hope it helps
11-26-2012 11:11 AM
Thanks for the help
It works with a (.csv) file type, but the layout in the excel file is horrible.
I have connected my two column 2d array to "write to spreadsheet file", but it only write into one column in excel, and unfortunaly also rounds the numbers on. How do i change that ?. I want two decimal numbers.
11-26-2012 11:11 AM
11-26-2012 11:42 AM
It looks like there's a localized decimal point issue here. What are you using for a delimiter? I would use a tab and change the extension to txt.