function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Wendy SadehWendy Sadeh 

create an custom export to excel xlsx format.

xlsx format is not supported. And xls format is no longer supported.
https://success.salesforce.com/answers?id=9063A000000iTIyQAM

I want to create an apex class to create a seperate worksheet for one to many custom object on opportunities.  Is there anyway to do this?  

I have custom code that create and xls file but I cannot open it with the latest Microsoft code.

Is there anyway to do this?  Another app?  Anything?
Virendra Singh NarukaVirendra Singh Naruka
Hi Wendy,

You can use VF page : 

<apex:page controller="customController" showheader="false" sidebar="false" contentType="application/vnd.ms-excel#SalesForceExport.xls" cache="true"  standardStylesheets="false" applyBodyTag="false"  applyHtmlTag="false" >  Excel file generated by this page will be compatiable to Microsoft code
Wendy SadehWendy Sadeh
Creating an xls file is not the problem I already have working code that will do that.  The problem is I need to create an xlsx file, as best as I can tell there is no way to do this in Salesforce.