issue #494 convert nan to null in exporttospreadsheet if appropriate + tests