-
1
- #1
I have been looking for a solution for exporting a file from Business Objects 517 into Excel. This uses a small amount of VB code embedded in the report.
A simplistic solution would be as follows:
Create your report in the usual manner.
1 Locate the report and open the code window.
2 Copy the following code into the report. Remember place the code into the Report not into a module.
Private Sub Document_AfterRefresh()
Dim dp As DataProvider
Dim myFileName As String
myFileName = InputBox("File name to Save As")
Set dp = ActiveDocument.DataProviders.Item(1)
Call dp.ConvertTo(ExpExcel, 1, myFileName)
End Sub
3 Return to the Business objects window and refresh the data.
4 At the prompt type in a file name.
5 The filename.xls can be located on your C:\ drive in the UserDocs sub-directory of the Business Objects Installation Directory.
Restrictions to use include loss of titles, and loss of formatting i.e. background colours etc.
Cheers
Matthew
A simplistic solution would be as follows:
Create your report in the usual manner.
1 Locate the report and open the code window.
2 Copy the following code into the report. Remember place the code into the Report not into a module.
Private Sub Document_AfterRefresh()
Dim dp As DataProvider
Dim myFileName As String
myFileName = InputBox("File name to Save As")
Set dp = ActiveDocument.DataProviders.Item(1)
Call dp.ConvertTo(ExpExcel, 1, myFileName)
End Sub
3 Return to the Business objects window and refresh the data.
4 At the prompt type in a file name.
5 The filename.xls can be located on your C:\ drive in the UserDocs sub-directory of the Business Objects Installation Directory.
Restrictions to use include loss of titles, and loss of formatting i.e. background colours etc.
Cheers
Matthew