in reply to Formatting cells in Excel

If you really want "0200" to show up as a text string, put a single quote before the first "0" -- despite M$'s explanatory promise in the "format" option that numbers will be displayed "exactly" emphasis supplied as entered. TTBOMK, excel does not provide any means to treat something that looks like a number with leading zeros, EXCEPT via the "Custom" option. You may want to pursue that if you really want "0200" to appear verbatim as a (text) string but (I think) also remain useable as a number, in the style of perl magic.

(But note davies' method posted above as I tried to sort out your intent).

The "7/18/1900" looks that date of the 200th day after Windows epoch date (1/1/1900). For a guess, the leading "T" and trailing "xt" reflect the fact that the Time element is missing from the 4 digits "0200."

More generally, perldoc WIN32::OLE contains some Excel examples... followed by a section on VARIANT(s). That may be worth perusing. And some folk (search for it) have reported good success learning about methods/quirks/etc in the interface between perl and Excel at the Micro$oft sit. That's probably worthwhile too.

Replies are listed 'Best First'.
Re^2: Formatting cells in Excel
by David S (Sexton) on Feb 03, 2010 at 03:06 UTC
    Thanks for the responses. Sorry I wasn't clear about the intent. I want to take a string that is the result of a 'dump' type operation. So, more of what I'm parsing is:
    0000: e0 01 00 00 d0 02 00 00 00 00 00 00 00 00 00 00 |.............. +..|
    So, I would want the number '0000' to be in a cell, and 'eo', '01', '00', ... also in individual cells. I'll try the suggestions tomorrow, but wanted to thank you for the responses.