You need to sign in to do that
Don't have an account?
ckellie
How do I create a visualforce excel worksheet from a dynamic page
I have a dynamic visualforce page where users will develope a list of records from three picklists. Once the user renders a list of records the user needs to open the page up in excel.
I have tried to create a extension to transfer the variables from the picklists to the new visualforce page, but have not been able to?
From a theoretical point, what do I need to do?
Excel has an undocumented feature of understanding HTML Tables.
This code was in the Visual Developer Docs. Under the Index look for ContentType. This will output an HTML Table that will be streamed to Excel.
Thank you for the answer, though it is a portion of what I am looking for.
I am needing to include the reasults from picklist that I have on the original visualforce page. Translated, I have already queried and return the desired data, and it is displayed on the screen. How do I translate what is visible on screen to an excel file without requerying the database?
You need to do this with 2 pages. The first page does all the data collection from your pick lists. The 2nd page is an output Template.
Make sure you use the same controller or controller / extension in both pages.
Step 1: Create a vf page that is your output template. Reference your vfClass that is doing the database quering from your first vfPage.
Step 2: On your first vf page create a button and method for the button.
<apex:commandbutton value"createOutput" action{!createOutput} />
In your controller you will have the following method
public Pagereference createOutput()
{
return new Pagereference('myOutputTemplate');
}
If you don't need to show the results before you create the output document you could simply return the template page from the button that gets the data.
If you need complete code let me know.
sfdc guy
I want to get the result in excell.
Each time some user applies filter and get the records in visualforce page->click on export to excell button->get excell file.
PLZ HELP
http://wp.me/p98HXm-G