hmmmm.... for some reason, i thought that "use Win32::OLE::Variant" did 
stringify Win32::OLE::Variant objects. my understanding now is that it 
just makes these display correctly if they are dates.

i am a newbie to Win32::OLE::Variant.

could you point me towards some example code that shows how to:

1. test whether or not a variable is indeed a Win32::OLE::Variant date 
object
2. stringify a Win32::OLE::Variant date object

thanks,

kevin

Jan Dubois wrote:
> On Fri, 01 Feb 2008, Kevin Beverly wrote:
>> i have an active state perl program that parses ms excel files for
>> loading into postgresql.
>>
>> i use
>>
>> use Win32::OLE::Const 'Microsoft Excel';
>> use Win32::OLE::Variant;
>>
>> to get the dates as text from a spreadsheet. i store the data as an
>> array of hashes and write it to disk with storable. everything works
>> fine until i try to retrieve the storable file. as soon as it hits that
>> date field, perl crashes. it works fine, tho if i format the date fields
>> as text.
>>
>> obviously, this could be an issue with storable. i sent this issue to
>> those folks as well.
> 
> You cannot freeze() Win32::OLE::Variant objects because they are implemented
> in C and have additional information hanging on to them that Storable knows
> nothing about.
> 
> This could be made to work for most Variant types by adding special
> Storable freeze/thaw hooks to Win32::OLE::Variant (e.g. it would
> obviously not work for VT_DISPATCH and VT_OBJECT).  I'll file this
> as an enhancement request for Win32::OLE.  For the time being it
> would probably be easiest to stringify Win32::OLE::Variant objects
> before freezing them.
> 
> Cheers,
> -Jan
> 

-- 
*******************************************************************
Kevin Beverly
Systems Analyst/Programmer
SCHARP / HIVNET Statistical Center
1100 Fairview Ave. North, LE-400
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: [EMAIL PROTECTED]
Phone: 206-667-6991
Fax: 206-667-4812
*******************************************************************
CONFIDENTIALITY NOTICE: This e-mail message and any attachments may be 
confidential and privileged. If you are not intended to receive this 
message, please notify the sender and destroy the message. Thank you.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to