Hi,
Below is an example snippet of using the SetDataCellsUsingCsvFile BRApi. As always, please test in a Development application first!
'get app config settings
Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si)
'retrieve exported cube data file from a path on the current application's fileshare
Dim folderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.FileShareRootFolder, si.AppName)
'define the full path including the file name
Dim filePath As String = folderPath & "\SomeFileNameFormsData.csv"
'next check if the file exists on the file share...
If File.Exists(filePath) Then
'define the source origin members
Dim sourceOrigins As New List(Of String)
sourceOrigins.Add("Forms")
'define target origin member
Dim targetOrigin As String = "Forms"
'process the file and load the data - do not load zeros
BRApi.Finance.Data.SetDataCellsUsingUsingCsvFile(si, filePath, ",", sourceOrigins, targetOrigin, False)
End If
Nick Kroppe
OneStream Software