Results 1 to 6 of 6

Thread: Excel Export - Data Only with Column Headings

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2018
    Location
    Fresno California
    Posts
    9

    Default Excel Export - Data Only with Column Headings

    In v6.2 the option to export "Data Only" does not export the column headings. I am aware that the option says "Data Only" but is there a way to set the report to include the column headings when "Data only" is selected? Perhaps a function I can write into the report where it recognizes that the "Data Only" option has been selected so I can force the headings section to show? My users do not have DataFlex Reports installed on their computers so I need to do this from the DataFlex application (exe) which they are running. I'm trying to get some feedback before submitting this as a ticket.

    Thank You

    Click image for larger version. 

Name:	Capture.PNG 
Views:	81 
Size:	10.4 KB 
ID:	12412

  2. #2
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    8,804

    Default Re: Excel Export - Data Only with Column Headings

    J_V,

    For this you normally use the column labels in the report header, group header etc sections and you can indicate during export if you want to export these sections.

    To Excel there is no difference between real data and column headings.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  3. #3
    Join Date
    May 2018
    Location
    Fresno California
    Posts
    9

    Default Re: Excel Export - Data Only with Column Headings

    Vincent, Thanks for your response. What I was looking for was an export of the data that would allow the user to work with the data in Excel. For this, the column headings are necessary. Using the page header, report header or group header options during export is not practical because it will repeat the column headings after every "Page" or try to maintain the formatting of the report in Excel. This means that the export to excel would contain multiple rows with the column headings and/or have formatting that doesn't allow fields to be sorted, filtered or formulas to be used. What I ended up doing was using the "Data Only" export option then adding code that would open the excel file after it was saved, insert a row at the top then add the column headers. Not ideal but it got the job done.

    Thanks again.

  4. #4
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    8,804

    Default Re: Excel Export - Data Only with Column Headings

    J_V,

    If you use data only and export the page header only on the first page and suppress the page footer the export will have the column headings from the page header and the data below.

    Keep in mind that DataFlex Reports is not directly meant/designed for exporting the data out of the database to Excel but designed as report engine that can format the data and then use Excel as one of the export techniques.

    If you are looking for export only look at the LibXL Library to implement in your own project.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  5. #5
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    6,399

    Default Re: Excel Export - Data Only with Column Headings

    I have an idea for how we could do this. Remember that users love to re work the data from reports in excel. In 999 cases out of 1000 anybody who exports to excel wants to work on the data from the report. One divot in a thousand actually wants DR to output a formatted eccel sheet with page breaks. So how about this. Add a property to each field. Call the property psExportAs, string 30. In the details section default it to the field name or some such. In the other sections default it to DR_DO_NOT_EXPORT.

    Then in the excel “data only” export only export the details not flagged DNE, using the psExportAs value for the column header. No page breaks. A simple data export.

    Personally I’d prefer that the data exported be de-normalized so if there are any group headers and such they should be added as columns in front of the detail data.

    Should I I add this as a YAFR in HDE?
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  6. #6
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    8,804

    Default Re: Excel Export - Data Only with Column Headings

    Michael,

    Yes, please log this as a suggestion in HDE. We go over suggestions from time to time.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •