This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: Ian <ian@isasports.com>, modperl <modperl@apache.org> From: John Whitnack <jwhitnack@glja.com> Subject: Re: Perl and Microsoft Excel? Date: Thu, 29 Nov 2001 15:44:56 -0700 Ian wrote: > The campus phone system has a 911 database that is in Microsoft Excel > format, and they want to be able to take that information, and show > it on a webpage, either via a search form, or in one big table. The > problem is, they want to do it dynamically...the web server needs to > yank it down from a samba share (or ftp), parse it, show it, and > terminate. I have never used it, but I have heard that Spreadsheet::ParseExcel is good at getting Excel file into a Perl script. If you every need to go the other way (Perl->Excel) i have used (and highly recommend) Spreadsheet::WriteExcel. Both of these can be found on CPAN. === To: <modperl@apache.org> From: Mark Fowler <mark@twoshortplanks.com> Subject: Re: Perl and Microsoft Excel? Date: Thu, 29 Nov 2001 22:45:25 +0000 (GMT) On Thu, 29 Nov 2001, Tom Servo wrote: > Hopefully someone else knows of a CPAN module to work with Excel files, > though... Spreadsheet::ParseExcel and Spreadsheet::WriteExcel? Both have ::Simple versions too. I've used them in the past and it's Worked For Me (tm) === To: "'Ian'" <ian@isasports.com> From: Charles Day <Charles.Day@frontstep.com> Subject: RE: Perl and Microsoft Excel? Date: Thu, 29 Nov 2001 17:46:18 -0500 If you couldn't convince the bosses to db this, you could use .cvs (tab delimited) instead of .xls, ftp it to your webserver every (cron) and have perl parse it out. People love their xls and access files don't they:) How about dumping the data into MS-SQL and have your db write the .xls file every (schedule). Then you can query your db any way you like from your website, and they can have their nice little xls file too:) Charles === From: Ian [mailto:ian@isasports.com] Sent: Thursday, November 29, 2001 5:31 PM To: modperl@apache.org Subject: Perl and Microsoft Excel? In the wide and wonderful world of Microsoft and Linux, I'm in the need of an interesting soloution. I'm presenting this to the list because I've ran out of good ideas. The campus phone system has a 911 database that is in Microsoft Excel format, and they want to be able to take that information, and show it on a webpage, either via a search form, or in one big table. The problem is, they want to do it dynamically...the web server needs to yank it down from a samba share (or ftp), parse it, show it, and terminate. I'm really **really** new at anything perl wise...so I haven't the foggiest clue as to where I should start. I've finally gotten Apache/Mod Perl/Mod SSL installed, and working properly. Are there any modules for pulling information from an excel sheet? How about modules that keep the overworked admin from insanity? === To: mod_perl From: "David Kaufman" <dkaufman@nac.net> Subject: Re: Perl and Microsoft Excel? Date: Thu, 29 Nov 2001 17:55:00 -0500 "Tom Servo" <tomservo@cnw.com> wrote: > On Thu, 29 Nov 2001, Ian wrote: > > The campus phone system has a 911 database that is in Microsoft Excel > > format, and they want to be able to take that information, and show > > it on a webpage, either via a search form, or in one big table. The > > problem is, they want to do it dynamically...the web server needs to > > yank it down from a samba share (or ftp), parse it, show it, and > > terminate. > > [...] > Hopefully someone else knows of a CPAN module to work with Excel files, > though... i count at least 5: http://search.cpan.org/search?mode=module&query=Excel i haven't used any of them, though. i've used Spreadsheet::WriteExcel, but it only *writes* Excel files, it doesn't read them (hence the name). it looks like Spreadsheet::ParseExcel http://search.cpan.org/search?dist=Spreadsheet-ParseExcel or Spreadsheet::ParseExcel::Simple http://search.cpan.org/search?dist=Spreadsheet-ParseExcel-Simple should do what you're looking for === To: modperl@apache.org From: Robin Berjon <robin@knowscape.com> Subject: Re: Perl and Microsoft Excel? Date: Fri, 30 Nov 2001 00:10:14 +0100 On Thursday 29 November 2001 23:31, Ian wrote: > In the wide and wonderful world of Microsoft and Linux, I'm in the > need of an interesting soloution. > > The campus phone system has a 911 database that is in Microsoft Excel > format, and they want to be able to take that information, and show > it on a webpage, either via a search form, or in one big table. The > problem is, they want to do it dynamically...the web server needs to > yank it down from a samba share (or ftp), parse it, show it, and > terminate. Another option than those that have been presented here would be to use XML::SAXDriver::Excel. It is imho superior to using some of the modules that parse Excel directly because it is SAX based. That means that you have a lot more power in your hands, and that if your data source move to something else (eg CSV, database, etc...) you'll be able to use nearly the same code. Furthermore, SAX is a simple, flexible, well-thought out, and well-documented API. === To: Ian <ian@isasports.com> From: Medi Montaseri <medi@CyberShell.com> Subject: Re: Perl and Microsoft Excel? Date: Thu, 29 Nov 2001 16:05:23 -0800 (PST) Two suggestions: One: drop the excel idea right now or you'll find out its not the right solution at a later time. Use LDAP instead. Then write a CGI (as you really don't need Mod-Perl) for all kinds of queries and an admin view for a maintainer to maintain it. Two: ask your spreadsheet maintainer to save the sheet in CSV (Comma Seperated Value) format someplace where a CGI can access it. Say www:/home/directory/list.csv Then use Samba and on the maintainer's windows machine have a network mapped drive, where this file will be saved as, say z:\list.csv, where z: is mapped to \\www\directory Then use Text::CSV.pm perl package to access this list.csv You are done....go home now.. PS: you might have to convert the '\r\n' to '\n' as samba does not change the line break symbols as it moves it from Windows to Unix. ===