You need to sign in to do that
Don't have an account?

unable to download xlsx file available in vf page
Hi all,
I am unable to download xlsx files which is available in my vf page in chrome and IE. Kindly help me.
In my controller i am using this stmt : attachBody = EncodingUtil.base64Encode(itrAttach.Body);
In VF Page : <a download="{!attachItem.attachName}" href="data:{!attachItem.attachContentType};base64,{!attachItem.attachBody}" > {!attachItem.attachName} </a>
Thanks in advance.
Regards,
Abinaya.
I am unable to download xlsx files which is available in my vf page in chrome and IE. Kindly help me.
In my controller i am using this stmt : attachBody = EncodingUtil.base64Encode(itrAttach.Body);
In VF Page : <a download="{!attachItem.attachName}" href="data:{!attachItem.attachContentType};base64,{!attachItem.attachBody}" > {!attachItem.attachName} </a>
Thanks in advance.
Regards,
Abinaya.
When I used the below in VF Page, I am able to download the files in all the browsers with all file size.
<a href="/servlet/servlet.FileDownload?file={!attachment.id}" download=" {!attachment.name}">{!attachment.name}</a>
Regards,
Abinaya S
All Answers
I am getting a string for the itrAttach.Body. When i click on the attachment nothing is happening.
Also this is not only happening for xlsx file. It is happening for all the content type which has greater than 1.5 MB file size.
Kindly let me know your comments.
Regards,
Abinaya S
When I used the below in VF Page, I am able to download the files in all the browsers with all file size.
<a href="/servlet/servlet.FileDownload?file={!attachment.id}" download=" {!attachment.name}">{!attachment.name}</a>
Regards,
Abinaya S
I need a small Help from you regarding the xlsx format we are able to do the xls format but i need to get that in the xlsx format can u kindly share me u r code :)
Thanks
Saikumar N