Does anyone know the command to export a report to a text file through Report script? I can convert to an excel file but the manual doesn’t say anything about exporting to a text file.
Rob - I’m afraid I don’t know the exact ReportScript command but wouldn’t it be along the lines of a Save As command ?
Darren.
Does anyone know the command to export a report to a text file through Report script? I can convert to an excel
file but the manual doesn’t say anything about exporting to a text file.
I am interested in exporting the raw data to a text file, not the actual report. Does anyone have a script that will export the raw data to a text file?
I believe the example provided earlier will convert a report to text. To export the data provider in 4.1.x as text try;
Sub main
dim dp as BODataProvider
set dp = ActiveDocument.DataProviders.Item(1) call dp.ConvertTo(ExpText,1,“Filename”)
End Sub
Mike McErlain
McErlain Consulting @ Cisco
At 04:26 PM 3/21/2000 -0500, you wrote:
I am interested in exporting the raw data to a text file, not the actual report. Does anyone have a script that will export the raw data to a text file? RV
Sub main
Dim app As BOApplication
Dim doc As BODocument
Dim reps As BOReports
Dim File_name As String
File_name = “C:\SPMetric4Data.txt”
On Error Resume Next
attribs=FileLen(File_name)
If attribs <> 0 then
kill (File_name)
end if
set doc = ActiveDocument
set app = Application
app.Interactive = FALSE
doc.Refresh
app.Interactive = TRUE
set reps = doc.Reports
reps.Item(1).ExportAsText(File_name)
doc.Close
End sub
In a message dated 00-03-21 16:24:43 EST, you write:
I am interested in exporting the raw data to a text file, not the actual report.
Does anyone have a script that will export the raw data to a text file?
It’s a bit confusing. The equivalent of the menu option “Save As” is written the the script language as ExportTo. The equivalent of the “Export” button on the data manager window is ConverTo. Example:
set dp = ActiveDocument.DataProviders.Item(1) call dp.ConvertTo(ExpAsciiTab,1,“OutPutFileName”)