I don't think this will work, but, on the other hand, Excel has a HEXDEC conversion function which might work. But I really think that converting the hex number into decimal notation in Perl prior to loading it to Excel, as suggested by choroba will be much easier.
| [reply] |
Excel's hex converter certainly used to be limited to numbers less then 512. I also believe that the OP is using Spreadsheet::WriteExcel or something from that stable rather than Win32::OLE, otherwise I would rush my BigInt xla out & suggest he used that, but I understand that it's a problem importing modules into Excel files using S:WE or its derivatives.
Regards,
John Davies
| [reply] |
Hi, thank you, I did not know the Excel conversion function was limited to 512, but I did not see anyway an easy way to use it within the context of a Perl program. Just another good reason to convert the numbers into decimal notation using Perl, before populating the spreadsheet (choroba's suggestion).
| [reply] |
Actually, I think that literally putting "0x" at the beginning made it from a number to a string and now Excel leaves it alone.
| [reply] |
Actually, this seems to have worked:
$hex_data = "0x".$hex_data;
That forces an 0x on the values that I print to Excel. That seems to be working. | [reply] [d/l] |