in reply to Converting Visual Basic Code to PERL

Can you provide some error messages, and maybe a larger extract of code to work from? It's very difficult (impossible) to even start to try and understand what's going on from the one line of code you've posted.

Thanks,
-- Foxcub
#include www.liquidfusion.org.uk

  • Comment on Re: Converting Visual Basic Code to PERL

Replies are listed 'Best First'.
Re: Re: Converting Visual Basic Code to PERL
by harish (Novice) on May 16, 2003 at 12:54 UTC
    Here's the Full Code. Iam trying to connect to a existing Crystal Report and save it as a excel file.
    use Win32::ODBC; use Win32::OLE; $ex = Win32::OLE->new('CrystalRuntime.Application', sub {$_[0]->Quit;} +) or die "Oops, cannot start Crystal"; $oReport = $ex->OpenReport ('C:\CrystalParameters\Myreportone.rpt', 1) + ; $oReport->{'EnableParameterPrompting'} = 0 ; $oexportoptions = $oReport->{'ExportOptions'} ; #######set the Export Options to Export it to Excel file ############# +##### $oexportoptions->{'FormatType'} = 36 ; $oexportoptions->{'DestinationType'} = 1 ; $oexportoptions->{'DiskFileName'} = 'c:\mytestreportone.xls' ; ####################################################### $oReport->Export(0);

    Edit: Added <code> tags. larsen

      Perhaps you should check with your documentation on whether this is exported as a COM method. I use LotusScript occasionally and some functions are designated as COM-only and others are inaccessible from COM (there's always a work-around though)