Forum Discussion
Upload XL file to Power BI Report Server
Thanks Jon, Let me look into it, Thanks for your time helping. Very much appreciated,
Hello Jon,
Could you provide REST API implementation sample code to upload XL to power BI Report Server, Very new to REST API and need some assistance. Thanks for your help. Thanks for your time, Very very much appreciated.
- lazarc8 years agoRegular Visitor
The issue is that when opening the file a NULL value was being added to the end of the file and corrupting it.
The problem resolved this by adding a [-1] to the length of the file.
Public Sub Main()
Try
DIM stream As FileStream = File.OpenRead(FILEPATH )
definition = New [Byte](stream.Length -1) {}
stream.Read(definition, 0, CInt(stream.Length))
stream.Close()
Catch e As IOException
Console.WriteLine(e.Message)
End Try
Try
rs.CreateResource(REPORTNAME, REPORTSERVER_FOLDER, False, definition , "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",Nothing)
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
-----------------------------------------------------
Please find the below link for more info.
https://stackoverflow.com/questions/2770210/programatically-upload-xml-file-to-ssrs-server
Thanks for your time looking into it, Very much appreciated.