Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

Export to Excel problem

edited January 2005 in Devices
Hi there

I want to make it possible to export my reports to Excel using TExtraDevice.
My problem is that when generating the Excel file then the columns header
and the data lines dosn't match. In the report design i am having the coloum
names in the header band and data are printed in the detail band.

In many cases the header in Excel are printed in another coloumn. I have
tryed to fix this by setting the ColSpacing to another value. I am having
many reports (100+) and it's a painfull job to fix this by changing the
ColSpacing value for every report.

Are there any other way to fix this problem?

--
Best regards / Med venlig hilsen

Kent Johansen
AK Techotel A/S
Denmark

Comments

  • edited January 2005
    The ColSpacing property should only be changed once. If you drop a ExtraOptions
    component on your main form and set it there, it will be used for any report you print.

    James Waler
    Waler Ltd
    http://www.waler.com
  • edited January 2005
    Yes, i know. But a Colspacing for one report is not necessarily the correct
    one for another report.

    Is there anything that i should take in mind when designing new reports
    reagarding export to Excel. Is it ie. best to have the same length for all
    fields or something like that.

    --
    Best regards / Med venlig hilsen

    Kent Johansen
    AK Techotel A/S

  • edited January 2005
    Reports for Excel work best when they are column reports like this:

    Header1 Header2
    Data1 Data2

    To make the data match the header just make sure that the header and data
    items are left aligned. Then when the device calculates the column to place the data in,
    they will both be the same.

    James Waler
    Waler Ltd
    http://www.waler.com
This discussion has been closed.