CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    How to export crystal report in excel with data only


    I am now using this code to export report to excel format

        Report.ExportOptions.ExcelExportAllPages = True
        Report.ExportOptions.DestinationType = crEDTDiskFile
        Report.ExportOptions.FormatType = crEFTExcel97
        Report.ExportOptions.DiskFileName = "D:\CommBackup\" & rs.Fields!MemberCode & "-" & Right(Year(DT1.Value), 2) & Format(Month(DT1.Value), "00") & ".xls"
        Report.Export (False)
    But how to export to excel with data only ?

  2. #2
    Join Date
    Jan 2006
    Fox Lake, IL

    Re: How to export crystal report in excel with data only

    If you're saving an XLS file, it won't be text.

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: How to export crystal report in excel with data only

    If you want to export data only I would consider using a query and save the data from the resulting recordset to a csv file.

    Can't help with Crystal as I scrapped that software years ago in favor of a more VB friendly report tool.
    Always use [code][/code] tags when posting code.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.