I tried to take a look at your program. The problem does not occur in writing the data to excel, that part is working correctly. The problem occurs earlier in the program since the data that is written to the table already contains the NaN's and the zero's. But because of the size of the block diagram it is almost impossible for me to see where the problem comes from. I consider you to take a good look at the formulas used and bit by bit dig down to see where the faulty data first occurs.
I also advise you to consider revising your program. Because of the large block diagram it is very hard to debug and maintain such an application. Try to break down your application in logical steps and create subvi's of these steps so you can maintain and tests separate parts of your program on functionality. It also gives a much better overview of you total application.
Best Regards,
RikP
Application Engineering
National Instruments
Rik Prins, CLA, CLED
Software Development Engineer