Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I followed the instructions provided by @rhall.
However, I seem to have trouble opening the downloaded xlsx file.
I keep on getting the following error :
"Excel cannot open the file "workbook.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
So far, I’ve tried setting the content type to :
application/vnd.ms-excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
and
application/vnd.openxml (as suggested here : https://coderanch.com/t/582495/open-source/opening-xlsx-file-downloaded-action)
Here is what I am trying to do:
What I am doing wrong?
Any help would be greatly appreciated.
Thanks,
Mike
@Mike P I've just tried the service as I wrote it and I got the same error as you. I then realised that I had not set up the tConvertType component properly. This is easily done. I don't see a tConvertType in your job, but maybe you just aren't showing it. Mine is configured as below....
The Schema
The Manual Cast config
Without this, it will not work.
Thanks for responding !
I added the tConvertType component, however I'm still getting the same error.
I also tried using a tJavaRow component to perform the conversion and mapping but I can't seem to get around this error
Are you getting a file with data in it? Or is it zero bytes? Is the file being named as you expect? I see you are setting the Content-Disposition dynamically. Also, have you tried the original example before adding to it?
The Content-Type should be "application/excel". I have tested the examples you gave....
application/vnd.ms-excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
and
application/vnd.openxml
.....and the second two work with my service, the first one uses the old Excel format and I get the same error as you.