Re: Perl and Microsoft Excel?
On Thu, 2001-11-29 at 23:37, Tom Servo wrote: There's probably a far better answer to this than I can give, but if not, an interim solution might be having whoever maintains these Excel files save them as .csv files. Excel can do that, and while you lose all the fancy formatting, it just dumps them in a comma seperated list, then you can split on commas to get the values out of it. Be careful, MScsv is not as simple as it seems. Fields containing , are enclosed in - thats OK. But those -enclosed fields saved from Excel can also contain linebreaks. Hth, Joachim
Re: Perl and Microsoft Excel?
El Jue 29 Nov 2001 19:31, Ian escribió: Mensaje firmado por ID de clave desconocido 962F87CA 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. I recommend making a mod_perl application for the list and store the information in mysql (and forget about excel if you can), and then, just take that information and publish on the web. Hans
Re: Perl and Microsoft Excel?
There's probably a far better answer to this than I can give, but if not, an interim solution might be having whoever maintains these Excel files save them as .csv files. Excel can do that, and while you lose all the fancy formatting, it just dumps them in a comma seperated list, then you can split on commas to get the values out of it. Hopefully someone else knows of a CPAN module to work with Excel files, though... Brian Nilsen [EMAIL PROTECTED] On Thu, 29 Nov 2001, Ian wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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? Ian - - From RFC 1925: (3) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPAa3NHRiiq+WL4fKEQKsRACgutpROPjPllax3Nvfat2R7YERlSQAn35Q 0vwYEFLgdzsz4Dfu98dUJzBy =Qs9B -END PGP SIGNATURE-
Re: Perl and Microsoft Excel?
Ian, 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. 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. John Whitnack
Re: Perl and Microsoft Excel?
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) Later. Mark. -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}
RE: Perl and Microsoft Excel?
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 -Original Message- From: Ian [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 5:31 PM To: [EMAIL PROTECTED] Subject: Perl and Microsoft Excel? Sensitivity: Private -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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? Ian - - From RFC 1925: (3) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPAa3NHRiiq+WL4fKEQKsRACgutpROPjPllax3Nvfat2R7YERlSQAn35Q 0vwYEFLgdzsz4Dfu98dUJzBy =Qs9B -END PGP SIGNATURE-
OT: Re: Perl and Microsoft Excel?
fyi - this is off topic since it does not have anything to do with mod_perl in particular. you should really ask on: news://comp.lang.perl.modules or one of the other newsgroups: news://comp.lang.perl.moderated news://comp.lang.perl.misc or on this helpful website: http://www.perlmonks.org/ when you ask a question like are there any modules, think http://search.cpan.org/ one of the best things about perl, is this site and the well organized set of modules that exist on it. a simple search for 'excel' brought up this likely candidate for your use: http://search.cpan.org/doc/KWITKNR/Spreadsheet-ParseExcel-0.2403/ParseExcel.pm good luck and enjoy perl! cliff 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'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? -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
Re: Perl and Microsoft Excel?
Tom Servo [EMAIL PROTECTED] 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=modulequery=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 hth, -dave
Re: Perl and Microsoft Excel?
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. -- ___ Robin Berjon [EMAIL PROTECTED] -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com --- Paranoids are people, too; they have their own problems. It's easy to criticize, but if everybody hated you, you'd be paranoid too.
Re: Perl and Microsoft Excel?
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 right 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 donego 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. Cheers... On Thu, 29 Nov 2001, Ian wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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? Ian - - From RFC 1925: (3) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPAa3NHRiiq+WL4fKEQKsRACgutpROPjPllax3Nvfat2R7YERlSQAn35Q 0vwYEFLgdzsz4Dfu98dUJzBy =Qs9B -END PGP SIGNATURE- -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -