Benjamin Walkenhorst wrote: > Hello everyone, > > Finally I get to use perl at work! =) > I am to facing the following problem: > > There is a folder on a file-server in our network which contains 60 - 70 > subfolders. Each of these subfolders contains a number of Excel-files > (.xls) ranging from zero to maybe five. > Each of these files again contains several worksheets, from which I am > to extract certain cells (these are at fixed positions) and somehow put > these to some nice output format (csv, html, maybe an SQL-database). > > As of now, I am more concerned about extracting the data. > There is a module, Spreadsheet::ParseExcel, which I've tried out, and it > seems to work. But the documentation says it can not handle all versions > of excel. > I am unsure what versions of Excel were used creating these files, > probably Excel 2000 and XP. > I'm going to try Spreadsheet::ParseExcel first, but if it does not work > - what other ways to access Excel-files are there? What reasons could > you think of to prefer one way over the other(s)? > > Thanks for your suggestions, > > kind regards, > > Benjamin
It is probably blasphemous to say this here, but if I was facing a mass of Excel, or any other M$ Office files, I would just use VB. It has the advantage of placement. It has immediate access to the built-in functionality. Here is the VB for a single file open and resave as CSV: Sub Macro2() ' Workbooks.Open Filename:="E:\d_drive\job\Lab Software.xls" ActiveWorkbook.SaveAs Filename:="E:\d_drive\job\Lab Software.csv", _ FileFormat:=xlCSV, CreateBackup:=False End Sub When you think out the logic for how to collect the input and output filenames and paths, that should be fairly straightforward. I got the above syntax by recording a macro and then opening the macro widow, and choosing Edit. Toss in some logic for filename collection and looping, and then it just takes a keypress. Then you can use Perl to prodess the SCV output, since this is a task at which Perl excels. Joseph Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>