03-24-2012 11:32 AM
Yes I know how to use notepad but i want all data saved in Notepad to be the format I want without changing anything in notepad. It's because in the future I'm gonna plug my program in the test bench. There will be a lot of works to do to fix all data in the right format in Notepad. I want it to be exactly what I want directly from Labview
03-24-2012 02:23 PM
03-25-2012 12:00 AM
>>>but i want all data saved in Notepad to be the format I want without changing anything in notepad
DO YOU REALLY UNDERSTAND ENGLISH? PLEASE READ MY POST AGAIN AND TRY TO UNDERSTAND WHAT I AM ASKING.
@Tushar wrote:
Open excel or notepad and create a report file manually. This file should reflect what exactly should be the format of file you are expecting.
then post it in the thread. it will help us to understand what you want to do, and then i can give you some sample code.
Listen man... We can solve your problem ONLY IF you can tell your problem clearly so that WE CAN UNDERSTAND WHAT YOUR PROBLEM IS.
If you reread this thread and especially your own comments, then you will understand that you have not explained your problem properly.
So if you create a dummy report file in notepad and post it. then WE CAN ANALYZE YOUR REQUIREMENT and HELP YOU OUT.
I am attaching one example code which I FEEL what you are looking for.
Tushar Jambhekar
tushar@jambhekar.com
Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog
03-25-2012 01:14 PM - edited 03-25-2012 01:15 PM
Sorry for the bad explaination. It's pretty hard to explain by text. Anyway I created the examples here, the real file from my vi and the file I want it to be.
Another thing, could you please save it in version 2010? I can't open it.
03-25-2012 11:55 PM
yes, now i understand what you are looking for. see this code. if this solves your problem then mark this post as solution and dont forget to give me kudos.
Tushar Jambhekar
tushar@jambhekar.com
Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog
03-26-2012 04:55 AM
Thank you so much for helping me.
Last questions!!
What does "NaN" mean in your file?
There is one row which is not in the same format as other data. I attached the text file that I saved from your vi.
03-26-2012 05:46 AM
And how to reduce decimal points to be only 2 digits?
3.000000 ----- 3.00
03-26-2012 10:51 PM
you can write code to replace NaN with empty string. As far as meaning of NaN is concerned i leave it to you as your assignment
you can open the file in excel instead of notepad and see that data is well formed.
>>And how to reduce decimal points to be only 2 digits?
>>3.000000 ----- 3.00
I leave it to you this as your second BIG assignment 🙂
When you are asking for help, first make sure you have worked on it. Forum is place to get help to solve your problems. it is not the place to get work done from somebody.
Tushar Jambhekar
tushar@jambhekar.com
Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog
03-27-2012 02:27 AM - edited 03-27-2012 02:31 AM
yes
03-27-2012 02:48 AM
I can never open any vi in my excel files because of the error;
"Excel cannot open the file becausethe file format or file extension is not valid. Verify that the file has not been corrupted and that the file extensions matches the format of the file"
Any ideas?