Issue #1298: Excel export broken in some circumstance
Fixed