11-26-2012 08:23 AM - edited 11-26-2012 08:25 AM
In the format input of the write to spreadsheet file you need to include the following string: %#g
(the default will only save to three decimal places)
11-26-2012 09:41 AM
Hello All;
Many thanks to all of you and especially to Phil because it works and by using write to spreadsheet.vi with transpose "T"; I got the array in one column within .txt file. Dear members; by applying %#g I got 6 digit precision after the decimal point. Is it possible to increase the number of digits after the decimal point?
Secondly Labview uses ',' for indicating the decimal point where as MATLAB uses '.' is it possible to convert the ',' into '.' while saving the data into .txt file because I need '.' to represent the decimal point.
Once again thanks to all ![]()
Regards
Attique Ur Rehman
11-26-2012 09:44 AM - edited 11-26-2012 09:45 AM
Hi attique,
do you ever care to read the context help? Especially for the format codes you're asking for?
Ever wondered why you get 6 digts after decimal point for a format code of "%#6g"? Ever tried with "%#12g"?
After reading the context help you would also try a format code like "%.;%#12g" without asking the forum for such simple things...
11-26-2012 09:46 AM
You can change the ',' to '.' and also the decimal places by changing the string format.
Replace %#g with something from here: http://zone.ni.com/reference/en-XX/help/371361E-01/lvconcepts/format_specifier_syntax/
11-26-2012 10:52 AM
Hello All,
My problem solved
Thanks to all of you especially Phil & GerdW for your precious time and help...
Regards
Attique Ur Rehman
11-26-2012 11:03 AM
Dear GerdW
I already read the http://zone.ni.com/reference/en-XX/help/371361E-01/lvconcepts/format_specifier_syntax/ and change the string format from '%#g' to '%#12g' but I didn't observed any difference in the digits after the decimal point except the size of output .txt file gets larger with '%#12g' string format. Thats why I raised this query on the forum ![]()
Anyhow as mentioned earlier my problem solved via applying the following string format '%,;%#g' so once again many thanks to you and all others for helping.
Kind Regards