• smartkelly
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I have a list view button attached to a VF page.  It exports the selected items to Excel using the contentType for Excel feature.

 

It works fine, but after the file has been saved to Excel, the user is just sitting there with a big blank screen.

 

No matter how I set the button behavior (new window, existing with sidebars, etc) the result is always the same.

 

Is there any way to incorporate a return URL in my VF code?

 

<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" cache="true" contentType="application/vnd.ms-excel#MyList.xls">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockTable value="{!selected}" var="acct">
<apex:column value="{!acct.name}"/>
<apex:column value="{!acct.type}"/>
<apex:column value="{!acct.Acct_Fax__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>