in reply to Re^3: How to get cell format of xls
in thread How to get cell format of xls

That's because you used undef, not defined.