in reply to Exporting from flatfile database

Your question as posed leaves many questions. Do you actually need Perl to convert the flatfile to an Excel ".xls" document or do you just want to put it into a compatible format that can be imported into Excel?

I would choose the latter since you can import your data directly into Excel as is:

If this is something that you plan to do repetitively, you can always set up an Excel macro to handle it. HTH,

--Jim

Update: Note that unless you can find a module that converts directly from a text file of your format to an Excel "*.xls" file that you will still have to go through the Excel import feature (even if you tweak it with Perl).

Replies are listed 'Best First'.
Re: Re: Exporting from flatfile database
by tachyon (Chancellor) on Dec 24, 2001 at 23:27 UTC

    KISS ++ jlongino. The simplest way is almost always the best. You don't need a nuclear warhead like Perl to crack an itty bitty chestnut like this....but of course once you learn Perl you can never go back to simple Excel macros without wishing for....

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      I hate to give a non-Perl answer but, keeping with KISS there is a simpler way. Any version of Excel 97 or above (maybe lower, but I cannot verify) will import a pipe delimited file, or any single char delimited file. The import wizard will allow about anything as the delimiter.

      Just go to Excel, open a copy of the file (preferrablly after changing the extension to .txt). Excel will open up the import wizard.
      In the first screen select "Delimited"
      On the next screen select "Other" and put a "|" in the box.
      Click through to the end
      Enjoy a frosty beverage of your choice

      grep
      grep> cd pub 
      grep> more beer
      
      I suppose that instead of an Excel macro she/he could use  Win32::OLE or somesuch. ;)

      --Jim