Skip to Content
0

Excel file Upload/download attachment issue

Mar 09, 2017 at 12:41 PM

441

avatar image

Hi Experts,

I am downloading an excel file from SAP gateway. I am using the below code for the same. I am able to download the excel file successfully but when I open the same I get some junk value as content i.e. the content is not at readable format.

I get a alert message as below while opening the file.

"Excel cannot open the file Demo.xls because the file format or file extension is not valid. Verify that file has not been corrupted and that the file extension matches the format of the file"

Upload Code:

upload excel

Download Code:

download excel

downloadexcel.png (17.4 kB)
uploadexcel.png (60.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jun Wu Mar 09, 2017 at 03:50 PM
0

if you are using gw excel export function , the suffix should be xlsx

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Jun Wu,

Thanks for your inputs.

The suffix used is xlsx only.

The issue is :

if we are upload excel from gateway, it is uploading successfully. On downloading the excel from UI, it gets downloaded with right content of data.

But if we are upload excel from UI, it is uploading successfully. On downloading the excel from UI, it gets downloaded with junk content of data.

And, alert message as below while opening the file.

"Excel cannot open the file Demo.xls because the file format or file extension is not valid. Verify that file has not been corrupted and that the file extension matches the format of the file".

0
Jun Wu Mar 10, 2017 at 12:43 PM
0

what's the backend code to handle upload?

Share
10 |10000 characters needed characters left characters exceeded