naive has asked for the wisdom of the Perl Monks concerning the following question:
###########################
# For Excel #
# (successful) #
###########################
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
my $excelfile = 'c:\\Perl\\code\\data_in.csv';
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $Book = $Excel->Workbooks->Open($excelfile);
$Book->SaveAs( 'c:\\Perl\\code\\data_out.csv');
###################################
# For Access #
# (unsuccessful) #
###################################
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Access';
my $accessfile = 'c:\\Perl\\code\\data_in.csv';
my $Access = Win32::OLE->GetActiveObject('Access.Application')
|| Win32::OLE->new('Access.Application', 'Quit');
my $Book = $Access->Tables->Open($accessfile);
$Book->SaveAs( 'c:\\Perl\\code\\data_out.mdb' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MS Access & WIn32::OLE
by screamingeagle (Curate) on Jan 29, 2002 at 07:09 UTC | |
|
Re: MS Access & WIn32::OLE
by simon.proctor (Vicar) on Jan 31, 2002 at 23:06 UTC |