in reply to excel format problem

Can't say I've ever worked with Excel, so this is just a random stab in the dark, but - have you tried formatting your number as 0x83834e82 or 83834e82h? Maybe that'll help.

Replies are listed 'Best First'.
Re^2: excel format problem
by Laurent_R (Canon) on Sep 03, 2014 at 17:37 UTC
    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.

      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

        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).
        Actually, I think that literally putting "0x" at the beginning made it from a number to a string and now Excel leaves it alone.
        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.