Solved
Forum Discussion
MarcusH
11 months agoValued Contributor
I think you need to tell OS that the file has contents. Try this:
Dim fileName As String = "test.xlsx"
Dim filePath As String = $"Documents/Users/{StringHelper.RemoveSystemCharacters(si.UserName,False,False)}"
Dim XFfileDataInfo As New XFFileInfo(FileSystemLocation.ApplicationDatabase,fileName,filePath)
XFfileDataInfo.ContentFileContainsData = True
XFfileDataInfo.ContentFileExtension = XFfileDataInfo.Extension
Dim XFfileData As New XFFile(XFfileDataInfo, String.Empty, objByte)
BRApi.FileSystem.InsertOrUpdateFile(si, XFfileData)
mireles
11 months agoNew Contributor III
Hi Marcus, thank you so much for your reply! Unfortunately the file is still being saved as an XML. To clarify, when I download it to my computer it is saved as an XML. When I try to open it from the OneStream file explorer it does open in Excel but with no content.
- MarcusH11 months agoValued Contributor
Which download button are you using?
Button 1 downloads in 'OneStream format' i.e. xml. Button 2 downloads in file format eg xlsx
- mireles11 months agoNew Contributor III
Wow, I can't believe the solution was so simple! Thank you so much and sorry for the oversight.
Related Content
- 4 years ago