If you want to write data inside while loop, then you must supply a valid filename to "write to spreadsheet" vi as write vi always ask user for filename when its "filename" input is emty (you can ask user for a filename using File I/O->Advanced->File Dialog vi BEFORE entering in a while loop OR - it's just simplier - use a shift register with emty path initialisation and pass it to write vi, and write vi output pass connect to output shift register).
If you want to write when all data have been acquired - i.e. after your while loop, than you must accumulate acquired data using a shift register (in your VI at the exit tunnel of while loop you have only data of the last iteration/acquisition, so only this data are saved). I'm changed a bit your vi,
so the data wiil be accumulated.
Usually, examles are the best explanations, so I've attached some.
Hope this helps.