Hi All
I've built a workbench that generates an Excel file. What the end goal is to have this work bench accessible through a web page and allow the user to download the result as a .xlsx (not a zipped .xlsx).
I've tried two ways to get this working:
- DataDownload
This works however the .xlsx is returned in a .zip - DataStreamer
This method works when running the workbench from FME Server (a download window appears) but when using the JS API you simple get the .xlsx return as a string (like if you tried to open a .xlsx file with notepad). Myself and a colleague have tried a number of ways to get this working by playing with the parameters (specifically opt_response format).
I've included the JS in its current state below...<script type="text/javascript">
var repository, workspace
window.onload = function() {
FMEServer.init({
server : "https://*******************",
token : "********************************"
});
repository = '***************'
workspace = "EXCEL_Download.fmw"
}
function getData (){
var PIDs = document.getElementById('projectID').value
FMEServer.runDataStreaming(repository, workspace, 'opt_responseformat=xlsx&ProjectIDs;='+PIDs, success)
}
function success (result){
console.log(result)
//var url = result.serviceResponse.url
//window.open(result, "_parent")
}
</script>
Any one have any thoughts on how this can be fixed?


