You need to sign in to do that
Don't have an account?
Issues to generate docx or xlsx file from Visualforce Page
We are using visualforce page to generate .docx file in salesforce. Everything works fine if we try with .doc and .xls files but we are facing some issues while generating only on docx and xlsx files, for doc and xl files its works fine. While opening downloaded it some error messages are throwing and only after clicking on those popup boxes we are unable to view the files.
We have tried mime-type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" with no luck. You can find mime-type reference from below link:
https://www.sitepoint.com/web-foundations/mime-types-summary-list
If visualforce doesn't support to generate .docx or .xlsx file please help me to find any doc which stated that?
We have tried mime-type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" with no luck. You can find mime-type reference from below link:
https://www.sitepoint.com/web-foundations/mime-types-summary-list
If visualforce doesn't support to generate .docx or .xlsx file please help me to find any doc which stated that?
So we can say salesforce doen't support to create .docx file.
For example:
Code:
<apex:page contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document#filename.docx;" cache="true"> </apex:page>
Result: .docx gets open without error
One Major point while generating the .doc file which I have realized, after downloading when we will try to open the generated .doc file and save this file it generates one folder for html stuffs. If you are facing this issue please refer the below code to resolve:
Code:
<apex:page controller="MyController" contentType="application/msword#filename.doc" sidebar="false" standardStylesheets="false"
applyHtmlTag="false" applyBodyTag="false">
</apex:page>
Please let me know if it help you.
All Answers
Any work around for the above problem.I am also experiencing a similar problem .
Let me know any solution if you found .arshadulla88@gmail.com
Thanks
So we can say salesforce doen't support to create .docx file.
For example:
Code:
<apex:page contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document#filename.docx;" cache="true"> </apex:page>
Result: .docx gets open without error
One Major point while generating the .doc file which I have realized, after downloading when we will try to open the generated .doc file and save this file it generates one folder for html stuffs. If you are facing this issue please refer the below code to resolve:
Code:
<apex:page controller="MyController" contentType="application/msword#filename.doc" sidebar="false" standardStylesheets="false"
applyHtmlTag="false" applyBodyTag="false">
</apex:page>
Please let me know if it help you.