Skip to main content
Newcomer
January 12, 2023
Solved

Loading txt file to custom table

  • January 12, 2023
  • 2 replies
  • 0 views

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

Best answer by ckattookaran

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)

2 replies

Newcomer
January 13, 2023

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)

MStucchiAuthor
Newcomer
January 16, 2023

Thanks, moving to the file to the share path worked.

As the file is received by email, we are looking on how to select it from local folder and move it to the share path before is being loaded.

Thanks and regards

Massimo