Fix test for availability of xlswrite.
(cherry picked from commit 6d1ee23437e898f09bfb4e0fb5bcfc3d52a0efda)