Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Exporting report to Excel - Column width option

In the Crystal Designer, I can Export a report to Excel and tell it to use the Detail line for the column widths.

I need to do this same thing in two other cases (because the Excel file is gettin extra columns from the report header) and can't figure out how.

1. From the Report Viewer, I can only say Export report, but have no other options (column width, grid lines, etc.).

2. From my .net application I save the file to Excel uwing the following code:

Try

myArray = New ArrayList

myArray.Add(reportYearMonthString)

myArray.Add(reportRebateProgramIDsStrings)

filePath = My.Computer.FileSystem.GetTempFileName().Replace(".tmp", "")

myReportManager.SaveReport(ReportsFilePath & cUnbilledReport, My.Computer.FileSystem.SpecialDirectories.Temp, myArray, _

Csg.Reporting.CrystalManager.ReportManager.SaveFormatTypes.Excel, My.Computer.FileSystem.GetName(filePath))

System.Diagnostics.Process.Start(filePath & ".xls")

Catch ex As Exception

' Do not overwrite an existing error.

If Not hasError Then

savedExc = ex

hasError = True

End If

End Try

Thanks,

Linda

Not what you were looking for? View more on this topic or Ask a question