use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
Win32::OLE->GetActiveObject('Excel.Application');
$excel = Win32::OLE->new('Excel.Application', 'Quit');
$book = $excel->WorkBooks->Add;
$sheet = $book->WorkSheets(1);
$sheet->Cells(1, 1)->{Value} = 'FF';
$sheet->Cells(1, 2)->{Value} = '=HEX2DEC(A1)';
$book->SaveAs('foo.xls');
$book->Close();
$excel->Quit;
CreateObject コマンドを使用した場合、Excel でアドインが読み込まれない
http://support.microsoft.com/kb/213489/ja ' If you need to register the functions and commands
' contained in a resource (XLL), use the RegisterXLL method.
' In the example below, all functions of Analys32.xll are
' registered.
' XL.RegisterXLL "Analys32.xll"