Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export or Save As to Excel A Solution for 5.1.7 1

Status
Not open for further replies.

MJPPaba

MIS
May 28, 2003
142
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top