java - The method getWorkbook(File) is undefined for the type Workbook -


To get the following error in the program

"The mandatory workbook for the getWorkbook (file) "Workbook type" in wb1 = Workbook.getWorkbook (new java.io.File (path));

  package excel; import org.apache.poi.ss.usermodel.Workbook; import org .testng.annotations.DataProvider; Import java.io * *; Import jxl.Cell; Import jxl.Sheet; Import jxl.read.biff.BiffException; Import jxl.read.biff.File; Sample of public class {Private stationary final String Path = Zero; @DetAccountor (name = "test") Personal object [] [] [] Creativity 1 () Exceptions thrown {object [] [] retobj = getexcel (); rotobj return;} personal string [] [] getexcel () throws exception {// Tudo auto-generated method stub String [] [] tabarray = null; {workbook wb1 = workbook. JET bookbook (try new java.io.File (path)); workbook workbook = workbook.jetbookbook (new java.photo (path)); sheet Sheet = workbook.set ("user login"); Cell tablestart = sheet.findCell ("login"); Int startrow = tablestart.getRow (); Int startcol = tablestart.getColumn (); Cell Tableange = Sheet.Findcel ("Login", startcol + 1, Beginners + 1,100, 64000, Wrong); Int endrow = tableend.getRow (); Int endcol = tableend.getColumn (); System.out.println ("startRow =" + startrow + ", endorav =" + Android + "," + "startcoll =" + startcol + ", endcall =" + endcall "); Tabar = new string [Andro - + 1] for [endcall - startcall + 1]; int ci = 0; (int i = startrow +1; i & lt; endo; i ++, ci ++) {int for cj = 0; J = StartCall + 1; J & LT; Endcall; J ++, CG ++) {Taparay [CI] [CG] = Sheet.Getsel (J, I) .Get CONTrants (); Println (tabarray [ci] [ CJ]);}}} hold (BiffException e) {// TODO auto-generated catch block e.printStackTrace ();} hold (IOException e) {// TODO o To-Generate Catch Block e.printStackTrace ();} Returning tabarre;}}  

I've gone through the link "" but it does not solve my problem, Can I suggest where Iam is going?


Comments