use strict; use OLE; use Win32::OLE::Const "Microsoft Excel"; use LWP::Simple; my ($catalog, $url, $url_file, $spsh_file); my ($excel, $workbook, $sheet); $url = "http://www.oreilly.com/catalog"; $url_file = "C:\\oreilly_file.html"; $spsh_file = "C:\\oreilly_spreadsheet.xlsx"; getstore($url, $url_file); $excel = CreateObject OLE "Excel.Application"; $excel -> {Visible} = 1; #___ OPEN EXISTING WORKBOOK $excel->{DisplayAlerts}=0; $workbook = $excel -> Workbooks -> Open("$url_file"); $sheet = $workbook -> Worksheets(1) -> {Name}; $sheet = $workbook -> Worksheets($sheet); $sheet -> Activate; $workbook -> SaveAs ($spsh_file); $excel -> Quit;