Package com.extentech.formats.XLS

Examples of com.extentech.formats.XLS.WorkSheetNotFoundException


    */
    public WorkSheetHandle[] getWorkSheets(){
        try{
          if(myfactory != null){
                int numsheets =mybook.getNumWorkSheets();
                if(numsheets == 0)throw new WorkSheetNotFoundException("WorkBook has No Sheets.");
                WorkSheetHandle[] sheets = new WorkSheetHandle[numsheets];
                for(int i =0;i<numsheets;i++){
                    Boundsheet bs = mybook.getWorkSheetByNumber(i);
                    bs.setWorkBook(this.mybook);
                    sheets[i] = new WorkSheetHandle(bs, this);
View Full Code Here


    public WorkSheetHandle getWorkSheet(String handstr)
    throws WorkSheetNotFoundException{
      if(sheethandles.get(handstr)!=null){
        if(mybook.getWorkSheetByName(handstr)!=null)
          return (WorkSheetHandle)sheethandles.get(handstr);
        else throw new WorkSheetNotFoundException(handstr + " not found");
      }
        if(myfactory != null){
            Boundsheet bs = mybook.getWorkSheetByName(handstr);
            if(bs != null){
                bs.setWorkBook(this.mybook);
                WorkSheetHandle ret = new WorkSheetHandle(bs, this);
                sheethandles.put(handstr, ret);
                return ret;
            }else{
                throw new WorkSheetNotFoundException(handstr);
            }
        }
        throw new WorkSheetNotFoundException("Cannot find WorkSheet " + handstr);
    }
View Full Code Here

    public WorkSheetHandle[] getReferencedSheets()
    throws WorkSheetNotFoundException{
    //first get the ptgArea3d from the parsed expression
    Boundsheet[] bs = myName.getBoundSheets();
    if(bs == null)
      throw new WorkSheetNotFoundException("Worksheet for Named Range: "+this.toString()+":"+ this.myName.getExpressionString());
    if(bs[0]==null)
        throw new WorkSheetNotFoundException("Worksheet for Named Range: "+this.toString()+":" + this.myName.getExpressionString());
    WorkSheetHandle[] ret = new WorkSheetHandle[bs.length];
    for(int x=0;x<ret.length;x++){
      ret[x] = mybook.getWorkSheet(bs[x].toString());
    }
    return ret;
View Full Code Here

TOP

Related Classes of com.extentech.formats.XLS.WorkSheetNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.