> -----Original Message----- > From: Ricci, Mark [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 26, 2002 8:13 AM > To: [EMAIL PROTECTED] > Subject: Excel to html format > > > Hello, > I have an Excel spreadsheet that a person saves to a network drive daily. I want to automate the task of opening > the file and saving it as html (the person can't do it themselves, their not technical enough! ). I know the OLE modules > can let you manipulate the data in a spreadsheet > > but can it save the file as html?
Yes. Suggest you read up on Win32::OLE module and microsoft office object models. See small example of saving an XLS file as HTML. To add your own error handling have a look at: - the 'Warn' option in Win32::OLE - Win32::OLE->LastError property <snip> use strict; use warnings; use Win32::OLE; my $HTMLFormat = 44; my $xlfile = 'e:\book1.xls'; my $htmlfile = 'e:\book1.html'; my $xl = new Win32::OLE("Excel.Application"); my $doc = $xl->Workbooks->Open($xlfile); $doc->SaveAs($htmlfile, $HTMLFormat); $xl->Quit; </snip> > > Thanks in advance, > Mark _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs