Copying Actuate Report Parameters Names To Excel

75 Views Asked by At

I have some actuate reports whose parameter names needs to copy to excel or text file. The Parameters of an actuate report resides in a .bas file.

Can someone help with an Excel macro code to open the .bas file and copy the parameter names to an excel sheet.

I am very new to macros so any help will be highly appreciated. Thanks

1

There are 1 best solutions below

0
Jon Carlstedt On BEST ANSWER

This question does not show any effort of solving the problem yourself, and no example code. Also, it does not specify how the .bas file looks. Please try to write more constructive questions in the future, or you will experience lots of downvotes. However, here is something that might get you going in the right direction.

If you record a macro and then go to data and import from text you will get some code that looks like this:

Sub Macro1()
'
' Macro1 Macro
'

'
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;C:\directory\filename.bas" _
        , Destination:=Range("$A$1"))
        .Name = "filename"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 65001
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = False
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = True
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
        1, 1, 1, 1)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
End Sub

You should then be able to use that code to build what you want.

This code imports a file as text, it delimits with "," and then place it in A1.