i want to open excel file in java project

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

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.