in reply to Handle Excel cells with the value #N/A in Perl
The value -2146826246 is actually 0x8000A07FA interpreted as a signed value. If you take it as an unsigned value, then it is 2148141050, which matches the value Excel is supposed to store in a VT_ERROR variant for #N/A.
Checking the Variant type from Perl should work like this:
if (ref($var) eq "Win32::OLE::Variant" && $var->Type == VT_ERROR) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Handle Excel cells with the value #N/A in Perl
by Angus (Novice) on Mar 30, 2010 at 14:13 UTC |