11-05-2008 10:05 AM
Hi,
I would like to write the string : #N/A in a text file so that when I open the text file whith Excel, those points don't appear on the plot. Whith the VI I have attached, those #N/A points are considered as 0 on the excel plot. Whereas if I write #N/A directly into excel (without using Labview) it works fine. I have only noticed that going through my program "#N/A" apperas on the left of the cell in excel, whereas when entered directly it is centered. I suppose I am using a wrong format or something like that but I can't find the solution.
Anyhelp would be great,
XP & 8.5
Regards,
Marc
Solved! Go to Solution.
11-05-2008 10:42 AM
11-05-2008 11:04 AM
Just for kicks, try putting a single quote before the #N/A in the string constant.
The single quote makes Excel consider it a text entry the way you get when you type it in.
Jim
11-06-2008 03:20 AM
Hi Smercurio and JCarmody,
First thank you for answering my question.
1°)Concerning Smercurio, deleating the space before #N/A in the text file makes it work. But I would like to avoid doing this each time, and just being able to write directly the correct expression from Labview.
2°)Concerning JCarmody, I had already tried putting eather " or ' signs before #N/A in Labview, and making sure I am ticking the correct option in Excel when I open the .txt file, but this doesn't work. I get "#N/A or '#N/A in the cell, but it is still consired as 0 on the plot.
Regards,
Marc
11-06-2008 06:54 AM
Hi Marc,
Have you try to open your text file with Excel 2007 ? what version do you have ?
Regards,
11-06-2008 07:12 AM
Hi Steve,
I am opening the text file with Excel 2000.
Marc
11-06-2008 08:29 AM
Do you open your .txt with the Excel Text Import Wizard ? See here to use it efficiently http://www.robelle.com/tips/st-export-excel.html
http://www.uic.edu/depts/accc/seminars/excel2000-intermed/import.html
also I invite you tu use this tool http://www.beside.com/index.html
I hope it helps.
Regards,
11-06-2008 08:55 AM
11-07-2008 04:32 AM
Is this correct, or is there a simpler way to reach my purpose?
Marc
11-07-2008 09:01 AM - edited 11-07-2008 09:02 AM
I would use the Select function and a single Format Into String function.