#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    47
    Rep Power
    11

    Saving Q Reports into Excel


    Im using Delphi 5 with Q Reports

    Is there anyway - at runtime - a user can save a report into an excel document

    Thanks
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4248
    Two options here:
    1. You can simply output the data into a text file and separate the fields using a tab or comma character. Excel can read this type of file (CSV) easily. In fact, if you name it with a .csv extension, Excel will recognize it as an excel file.

    2. You can actually output to an excel spreadsheet using ADO or the Excel OLE Automation model.
    See http://community.borland.com/article...,20066,00.html for an ADO example
    See http://www.delphifaq.com/fq/q2057.shtml and http://www.djpate.freeserve.co.uk/AutoExcl.htm for examples using OLE Automation.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo