Hello
I am trying to export crystal reports data to excel but there are probably at least 20 extra columns when I use my code to run the export. When I manually export to excel using the format 'MS Excel 97-2000 (Data Only)' it works perfect. I don't know the correct way to code the data only part. This is what I have.
Dim CrApp As Object
Set CrApp = New Craxdrt.Application
Dim CrRep As Craxdrt.Report
Set CrRep = CrApp.OpenReport("N:\Job Log\AC-JOBLOG PRINTED.rpt")
With CrRep.ExportOptions
.DestinationType = crEDTDiskFile
.FormatType = crEFTExcel80
.DiskFileName = "N:\Job Log\AC-JOBLOG PRINTED REPORTS.xls"
End With
CrRep.Export (False)
Set CrRep = Nothing
Set CrApp = Nothing
Does anybody know what I should put in .FormatType to get data only so it exports correctly. Thanks
Lisa
I am trying to export crystal reports data to excel but there are probably at least 20 extra columns when I use my code to run the export. When I manually export to excel using the format 'MS Excel 97-2000 (Data Only)' it works perfect. I don't know the correct way to code the data only part. This is what I have.
Dim CrApp As Object
Set CrApp = New Craxdrt.Application
Dim CrRep As Craxdrt.Report
Set CrRep = CrApp.OpenReport("N:\Job Log\AC-JOBLOG PRINTED.rpt")
With CrRep.ExportOptions
.DestinationType = crEDTDiskFile
.FormatType = crEFTExcel80
.DiskFileName = "N:\Job Log\AC-JOBLOG PRINTED REPORTS.xls"
End With
CrRep.Export (False)
Set CrRep = Nothing
Set CrApp = Nothing
Does anybody know what I should put in .FormatType to get data only so it exports correctly. Thanks
Lisa