You need to sign in to do that
Don't have an account?
yud
Export a pageBlockTable to Excel
Hi
How do I export a pageBlockTable to Excel.
The page does not uses a standart controller but a custom and the pageBlockTable is not the only item on the page.
Thanks
Yitzchak
Hi
I found the problem - My page was contained a <apex:form> element.
When I remove it everything becomes ok
Thanks anyway.
Yitzchak
All Answers
create a duplicate version of your page with the contenttype set to excel.
Check out an article on it here:
http://blog.sforce.com/sforce/2008/12/visualforce-to-excel.html
Thanks.
I already did it but then the generated file can be opened only on excel 2007 (with a warning message) but not in excel 2003.
Should I need to add something else, except adding the "contenttype" attribute?
Yitzchak
Did you try it with an explicit file name?
Something like this:
<apex:page standardController="Account" contenttype="application/vnd.ms-excel#myacct.xls">
Yes I do.
My page code is:
<apex:page controller="IncomeRecognitionController" contenttype="application/vnd.ms-excel#test1.xls" cache="true">
But the file could not opened on excel 2003.
Yitzchak
Hi
I found the problem - My page was contained a <apex:form> element.
When I remove it everything becomes ok
Thanks anyway.
Yitzchak