Skip to Content
0
Former Member
Mar 05, 2009 at 01:14 PM

Reading Excel file values in Webdynpro

20 Views

Hi All,

I have an excel document and i have uploaded it through file Upload UI and got the file resiurce as an InputStream

 try {
	WDResource resource = wdContext.currentVn_ExceluploadElement().getVa_FileResource();
	
	InputStream in  = resource.read(false);	
		
	}
catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} 

i got it as inputstream and i have also added the jxl jar file.

When i try get the values in the Excel using below code, i was not able to that.

its not throwing any error and its not at all excuting anything.

 Workbook workbookread;
         try {
               Workbookread = Workbook.getWorkbook(in); 
                   int rows = 0;
                   Sheet s;
                   int cols = 0;
                   s = workbookread.getSheet(0); 

Pls. help me out with procedure or code.

Thanks,

Suresh