Leser: 2
![]() |
![]() |
10 Einträge, 1 Seite |
use Win32::OLE::Const 'Microsoft Excel' or Spreadsheet::SimpleExcel;
1
2
3
4
5
6
7
8
9
10
11
12
my $OLE = 0;
BEGIN{
eval{
require Win32::OLE::Const;
Win32::OLE::Const->import('Microsoft Excel');
$OLE = 1;
};
if( $@ ){
require Spreadsheet::SimpleExcel;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
my $OLE = 0;
BEGIN
{
eval
{
require Win32::OLE::Const;
Win32::OLE::Const->import('Microsoft Excel');
$OLE = 1;
};
if ( $@ )
{
require Spreadsheet::SimpleExcel;
$OLE = 2;
}
}
print qq(Result: $OLE\n);
1
2
3
4
5
6
7
BEGIN
{
if (! Win32::OLE->CreateObject("Excel.Application"))
{
require Spreadsheet::SimpleExcel;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
my $OLE;
BEGIN
{
eval
{
require Win32::OLE::Const;
Win32::OLE::Const->import('Microsoft Excel');
$OLE = 1;
};
if ( $@ )
{
require Spreadsheet::SimpleExcel;
$OLE = 2;
}
}
print qq(Result: $OLE\n);
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
use warnings;
my $OLE;
BEGIN{
$OLE = 5;
}
print $OLE;
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
use warnings;
my $OLE = 0;
BEGIN{
$OLE = 5;
}
print $OLE;
![]() |
![]() |
10 Einträge, 1 Seite |