我正在处理 Visualforce 页面。我在 visualforce 页面上有一个列表,我想将该列表导出为 CSV 文件,其中包含一些样式,如粗体字母和超链接。
我试过这个:
<apex:page controller="RequestListController" sideBar="false" showheader="false" standardStylesheets="false" cache="true" contentType="application/vnd.ms-excel#List.csv">
<b>"{!selectedRequestStatus}"</b> List,
<b>"Total Records:"</b> {!totalRecords},
<b>"Showing records from {!displayingFrom} to {!displayingTo}"</b>,
"",
"Action","Type","Institution","Site","Study","Subject ID","Submitted By","Date Submitted"
<apex:repeat value="{!appReqList}" var="app">
"<apex:outputLink value="{!app.Approval_URL__c}">Approve / Reject</apex:outputLink>","{!app.Object_Label__c}","{!app.Institution__r.Name}","{!app.Site__r.Name}","{!app.Study__r.Name}","{!app.Subject_Id__c}","{!app.CreatedBy.Name}","<apex:outputText value="{0,date,MM'/'dd'/'yyyy' 'hh:mm a}"> <apex:param value="{!app.CreatedDate}" /> </apex:outputText>"
</apex:repeat>
</apex:page>
但这不起作用。它按原样显示html标签。有谁能够帮助我。提前致谢