How to export crystal report in excel with data only
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

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

  1. #1
    Join Date
    May 2004
    Posts
    7

    How to export crystal report in excel with data only

    Hi,

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

    Code:
        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
    Location
    Chicago, IL
    Posts
    14,982

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

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

    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 online now Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,825

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center