how do I export searched data to excel? or even not yet search?
<apex:page standardController="Account" Extensions="GoodStandingController" contentType="application/vnd.ms-excel#SalesForceExport.xls" cache="true">
<style type="text/css">
body {background: #F3F3EC; padding-top: 15px}
</style>
<apex:form >
<apex:pageBlock title="Search by Date" id="block" mode="edit">
<apex:pageMessages />
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:panelGroup >
<b>Affiliate ID: </b><apex:param Name="Affiliate ID" id="searchText" value="{!$CurrentPage.parameters.searchText}"/><p/>
<b>AsOfDate: </b><apex:param Name="AsOfDate" id="AsOfDate" value="{!$CurrentPage.parameters.AsOfDate}"/> <p/>
<apex:commandButton value="Search" action="{!search}" rerender="resultsBlock" status="status"/><p/>
</apex:panelGroup>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:actionStatus id="status" startText="Searching... please WAIT..."/>
<apex:pageBlockSection title="Good Standing Status as of {!AsOfDate}" showHeader="true" id="resultsBlock" columns="2">
<apex:pageBlockTable title="Status" value="{!searchResults}" var="o" rendered="{!NOT(ISNULL(searchResults))}">
<apex:column headerValue="Name">
<apex:outputLink value="/{!o.Id}">{!o.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!o.AR_Number__c}"/>
<apex:column >
<apex:dataTable value="{!o.Good_Standing_Status_History__r}" var="q">
<apex:column headerValue="Status" value="{!q.Good_Standing_Status_New__c}"/>
<apex:column headerValue="Date" value="{!q.Change_Date__c}"/>
</apex:dataTable>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>