We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,703 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to open excel file in java

i want to open excel file in java project

4
Contributors
4
Replies
3 Hours
Discussion Span
11 Months Ago
Last Updated
5
Views
kunaldinde
Newbie Poster
4 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

http://www.rgagnon.com/javadetails/java-0516.html

googled 'excel files in java', this was the third hit

phoenix_2000
Junior Poster
143 posts since Sep 2011
Reputation Points: 40
Solved Threads: 16
Skill Endorsements: 0

Hi,

I have gone through this program.

try{ 
String ROOT_PATH = "C:\\tomcat\\webapps\\SnetReport\\REPORT\\"; FileInputStream in = new FileInputStream(ROOT_PATH + sFilename); 
response.setContentType("application/xls"); response.setHeader("Content-Disposition", "attachment;filename=\"Report.xls\""); 

int i; while ((i=in.read()) != -1) 
{ out.write(i); } 
in.close(); 
out.close();}catch(Exception e) 

System.out.println("...error while loading: "+e.toString());}

In the above code what is the sFileName

arjunrai
Newbie Poster
2 posts since Jun 2012
Reputation Points: 0
Solved Threads: 1
Skill Endorsements: 0

is this a seperate question? if so, please start a new thread. this is highjacking, and not really appreciated.

phoenix_2000
Junior Poster
143 posts since Sep 2011
Reputation Points: 40
Solved Threads: 16
Skill Endorsements: 0

We have a jar called POI for using excel sheet in java.. we have enough api for use them effictively

Jaisu_jas
Newbie Poster
1 post since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0617 seconds using 2.65MB