MStucchi
2 years agoNew Contributor III
Loading txt file to custom table
We are trying to load txt file to custom table using LoadCustomTableUsingDelimitedFile but when it runs we receive a "Data load file is invalid or missing" error. The file is manually selected from a folder.
The file is correct, the number of fields in the file and in the table match, the values and the field type match and the field separator is correct.
We are uploading the file from a Dashboard button component which calls a Dashboard extender BR.
This is the BR code:
Dim filePath As String = args.NameValuePairs.XFGetValue("FilePath")
Dim tableName As String = args.NameValuePairs.XFGetValue("TableName")
Dim loadResults As TableRangeContent
Dim fieldTokens As New List(Of String)
fieldtokens.add("field1")
fieldtokens.add("field2")
...
fieldtokens.add("fieldn")
loadResults = BRApi.Utilities.LoadCustomTableUsingDelimitedFile(si, _
SourceDataOriginTypes.FromFileUpload, filepath, Nothing, ";", _
"Application", tableName, "Replace", fieldtokens, False)
Return loadResults
Any siggestion really appreciated.
Thanks and regards
Where are you loading the file? Is that to a file share path? The load can be done from File Share only.
Look at Solved: Unable to load from Excel file to custom table - OneStream Community (onestreamsoftware.com)