アットウィキロゴ

罫線

package credit;
 
import java.io.FileInputStream;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
 
 
 
public class pro {
 
 
    public static void main(String[] args) {
       pro test=new pro();
    }
 
  pro(){  
 
   String file;
   int number;
 
   number=1;
   file="data.xls";
 
      try{
 
    FileInputStream is = new FileInputStream(file);
    Workbook wb = new HSSFWorkbook(is);
    Sheet sh = wb.getSheetAt(number);
 
    int s,sx,h;
    s=8;
 
    for(sx=1;sx<7;sx++){
   Row row = sh.getRow(s-1);
   Cell cell = row.getCell(sx-1);
   h=0;
   if(cell==null)h=100;
   if(h<50){
   CellStyle s1 = cell.getCellStyle();
    short r1=s1.getBorderRight();
   short r2=s1.getBorderLeft();
    System.out.println(sx+","+r1+","+r2);
   } 
 
   }
 
 
 
      } catch (Exception e) {e.printStackTrace();}
 
 
 
 
 
 
 
  }
}
 
最終更新:2014年02月11日 01:23