You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
400 B
Raku
16 lines
400 B
Raku
use Win32::OLE;
|
|
|
|
$operand1 = '2';
|
|
$operand2 = '2';
|
|
|
|
$excelobject = Win32::OLE->new('Excel.Sheet');
|
|
|
|
$excelobject->Cells(1,1)->{Value} = $operand1;
|
|
$excelobject->Cells(2,1)->{Value} = $operand2;
|
|
|
|
$excelobject->Cells(3,1)->{Formula} = '=R1C1 + R2C1';
|
|
|
|
$sum = $excelobject->Cells(3,1)->{Value};
|
|
|
|
$excelobject->Quit();
|
|
print "According to Microsoft Excel, $operand1 + $operand2 = $sum.\n"; |