html5 - How to open an excel sheet on click of html hyper link? -


i want open excel sheet (.csv file) on click of hyper link in html.the document stored in folder within current project root folder.

//for action need following code   public string execute() throws exception {         fileinputstream = new fileinputstream(new file("c:\\test.csv"));         return success;     }  //struts.xml file need following changes.fileinputstream contains fileinputstream added struts.xml.  <action name="download" class="com.expertwebindia.action.downloadaction"> <result name="success" type="stream">   <param name="contenttype">application/octet-stream</param>   <param name="inputname">fileinputstream</param>   <param name="contentdisposition">attachment;filename="test.csv"</param>   <param name="buffersize">1024</param> </result> </action> 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -