1

I have uploaded an excel sheet into static resource of my environment. I have it as a demo for my product how to create a excel sheet for import records into sf. Can any body guide me how can i provide link on the VF page so that user can download the record at single click.I want to into a managed package and want users to be able to click the link on the Vf page to download. Right now i have my demo excel sheet in static resource. I am open if you have any other ideas to get the process done.

0

If you want to store it as a static resource its your choice but storing it in Documents/ Contents or any other Doc management space makes more sense to store data. Personally I store all the EV variables and code related settings in the static resources

IF you choose static resource go to the resource and right click on the file and see the location of the file on server and use it in the code below enter image description here

<apex:page >
<apex:form >
<apex:outputLink value="/puttheurlofthefile">download_Excel_File</apex:outputLink>
</apex:form>
</apex:page>

UPDATE:

I do not have too much experience around managed package, but I believe that you can add your static resource to managed package and use it as

<apex:page >
<apex:form >
<apex:outputLink value="{!URLFOR($Resource.Excel_file)}">download_Excel_File</apex:outputLink>
</apex:form>
</apex:page>
  • Thanks Rao, But i want to into a managed package and want users to be able to click the link on the Vf page to download. – AnuRaj Aug 2 '13 at 6:53
  • @AnuRaj See if the update works for u – Rao Aug 2 '13 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.