You need to sign in to do that
Don't have an account?
manishtiwary1.390210540410199E12
How prevent to redirect to blank page on Excel Export
How we can prevent to redirect a visual force page to blank page on excel export
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
You can't avoid the blank page I'm afraid. The blank page is only skipped if you are linking directly to a .xls file, but you aren't - you are linking to a page that generates excel data. If you have a Visualforce page that renders as Excel, you need to open that page in the browser in order to create the Excel format information to download.
The best solution I've been able to come up with is to iframe the Visualforce page that generates the Excel format data inside another Visualforce page that contains some information about what is happening and a link to go back to the original page. Its not ideal but is a better experience than a blank page.
Hi Manish,
Wriet a method in your class to rirect to the excel fiel. Will be similar to this:
From page, Call this method like:
result will be like this. This screenshot is from a running project and all is using VF page. On clicking Export details, it start downloading the Excel file. Parent screen is VF page.
Did it work for you?