当前位置: 首页>>代码示例>>Java>>正文


Java RowsExceededException类代码示例

本文整理汇总了Java中jxl.write.biff.RowsExceededException的典型用法代码示例。如果您正苦于以下问题:Java RowsExceededException类的具体用法?Java RowsExceededException怎么用?Java RowsExceededException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RowsExceededException类属于jxl.write.biff包,在下文中一共展示了RowsExceededException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readExcel

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void readExcel(String inputfileName, String outputfileName) throws BiffException, IOException , RowsExceededException, WriteException{
	Workbook wb=Workbook.getWorkbook(new File(inputfileName));
	Sheet sheet = wb.getSheet(0); //get sheet(0)
	WritableWorkbook wwb = Workbook.createWorkbook(new File(outputfileName));
	WritableSheet ws = wwb.createSheet("topicName", 0);
	//traversal
	for(int i=0; i<sheet.getRows(); i++)
	{
		String content = sheet.getCell(0,i).getContents();
		String[] words = content.split("\\(");
		content = words[0];
		content = content.toLowerCase();
		content = content.replaceAll("_", " ");
		content = content.replaceAll("-", " ");
		content = content.replaceAll("\\s+", " ");
		if(content.contains("data structure") && !content.trim().equals("data structure"))
			content = content.replaceAll("data structure", "");
		Label labelC = new Label(0, i, content.trim()); 
		ws.addCell(labelC); 
	}
       wwb.write();    
       wwb.close();
}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:24,代码来源:TopicNameProcess.java

示例2: addMultipleLabelsWrap

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private void addMultipleLabelsWrap(WritableSheet sheet, int col, int row, String s[], WritableCellFormat format) throws RowsExceededException, WriteException {
	if (sheet==null || s==null)
		return;
	
	if (s.length==0)
		return;
	
	if (s.length==1)
		sheet.addCell(new Label(col,row,s[0],format));
	else {		
		String result = s[0];
		
		for (int i=1; i<s.length; i++)
			//result = result + ", " + s[i];	
			result = result + "\n" + s[i];
		sheet.addCell(new Label(col,row,result,format));
	}
}
 
开发者ID:vagfed,项目名称:hmcScanner,代码行数:19,代码来源:Loader.java

示例3: addNumber

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private void addNumber(WritableSheet sheet, int col, int row, String s[], int index, WritableCellFormat format) throws RowsExceededException, WriteException {		
	if (sheet==null || s==null)
		return;
	
	if (index>=s.length)
		return;
	
	double d; 
	
	try {
		d = Double.parseDouble(s[index]);
		
		// Only keep 2 digits: avoid rounding errors
		d = 1d*(int)(d*100)/100;
		
		sheet.addCell(new Number(col,row,d,format));
	} catch (NumberFormatException nfe) {}	
}
 
开发者ID:vagfed,项目名称:hmcScanner,代码行数:19,代码来源:Loader.java

示例4: addNumberDiv1024

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private void addNumberDiv1024(WritableSheet sheet, int col, int row, String s[], int index, WritableCellFormat format) throws RowsExceededException, WriteException {		
	if (sheet==null || s==null)
		return;
	
	if (index>=s.length)
		return;
	
	double d; 
	
	try {
		d = Double.parseDouble(s[index]);
		d = d / 1024;
		
		// Only keep 2 digits: avoid rounding errors
		d = 1d*(int)(d*100)/100;
		
		sheet.addCell(new Number(col,row,d,format));
	} catch (NumberFormatException nfe) {}	
}
 
开发者ID:vagfed,项目名称:hmcScanner,代码行数:20,代码来源:Loader.java

示例5: writeCell

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
/**
 * @param columnPosition - column to place new cell in
 * @param rowPosition - row to place new cell in
 * @param contents - string value to place in cell
 * @param headerCell - whether to give this cell special formatting
 * @param sheet - WritableSheet to place cell in
 * @throws RowsExceededException - thrown if adding cell exceeds .xls row limit
 * @throws WriteException - Idunno, might be thrown
 */
public void writeCell(int columnPosition, int rowPosition, String contents, boolean headerCell,
    WritableSheet sheet) throws RowsExceededException, WriteException{
    //create a new cell with contents at position
    Label newCell = new Label(columnPosition,rowPosition,contents);
 
    if (headerCell){
        //give header cells size 10 Arial bolded 	
        WritableFont headerFont = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD);
        WritableCellFormat headerFormat = new WritableCellFormat(headerFont);
        //center align the cells' contents
        headerFormat.setAlignment(Alignment.CENTRE);
        newCell.setCellFormat(headerFormat);
    }
 
    sheet.addCell(newCell);
}
 
开发者ID:jonathanbsilva,项目名称:Phonegap-XLS-Plugin,代码行数:26,代码来源:Xls.java

示例6: writeWorkbook

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public void writeWorkbook(WritableWorkbook workbook,
                           Iterator<T> iter)
  throws RowsExceededException, WriteException
{
  WritableSheet sheet = null;
  int i = 0;
  while (iter.hasNext()) {
    if (i % MAX_DATA_ROWS == 0) {
      sheet = createSheet(workbook);
    }
    writeRow(i, sheet, iter.next());
    ++i;
    if (i % 1000 == 0) {
      if (log.isDebugEnabled()) {
        log.debug("wrote " + i + " rows to workbook");
      }
    }
  }
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:20,代码来源:ExcelWorkbookDataExporter.java

示例7: main

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void main(String file_path[]) throws IOException, BiffException, RowsExceededException, WriteException 
{	
	String InputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\数据结构上下位关系.xls";
	String OutputfileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\数据结构上下位关系-子连父new.xls";
	hyponymyFilter(InputFileName, OutputfileName);
	System.out.println("done"); 
}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:8,代码来源:hyponymyProc2.java

示例8: main

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void main(String[] args) throws IOException, RowsExceededException, BiffException, WriteException
{
	String InputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\topicPredicate.xls";
	String OutputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\subjectPredicate.xls";
	procExcel(InputFileName, OutputFileName);
	System.out.println("done"); 
}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:8,代码来源:gDBPediaProc.java

示例9: main

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void main(String file_path[]) throws IOException,  BiffException, RowsExceededException, WriteException 
{	
	String InputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\Data_structure_topics.xls";
	String OutputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\Data_structure_topics_filter.xls";
	readExcel(InputFileName, OutputFileName);
	System.out.println("done"); 
}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:8,代码来源:TopicNameProcess.java

示例10: main

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void main(String[] args) throws IOException, RowsExceededException, BiffException, WriteException
	{
		String oriPath = "E:\\我是研究生\\任务\\分面树的生成\\Content\\";
//		String OutputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\hyponymyExtract.xls";
//		hyponymyExtract(oriPath, oriPath + "otherFiles\\hyponymyExtract.xls");
		moveOnceFacet(oriPath + "otherFiles\\hyponymyExtract.xls", oriPath + "otherFiles\\hyponymyExtract_onceFilter.xls");
		System.out.println("done"); 
	}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:9,代码来源:HyponymyExtract.java

示例11: main

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
public static void main(String file_path[]) throws IOException, BiffException, RowsExceededException, WriteException 
{	
	String InputFileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\数据结构上下位关系-子连父new.xls";
	String OutputfileName = "E:\\我是研究生\\任务\\分面树的生成\\Content\\otherFiles\\数据结构上下位关系-use.xls";
	hyponymyFilter(InputFileName, OutputfileName);
	System.out.println("done"); 
}
 
开发者ID:guozhaotong,项目名称:FacetExtract,代码行数:8,代码来源:hyponymyProc.java

示例12: addLabel

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private int addLabel(WritableSheet sheet, int col, int row, String s, WritableCellFormat format) throws RowsExceededException, WriteException {
	if (s==null){
		sheet.addCell(new Label(col,row,null,format));
		return 0;
	}
	
	sheet.addCell(new Label(col,row,s,format));
	return s.length();
}
 
开发者ID:vagfed,项目名称:hmcScanner,代码行数:10,代码来源:Loader.java

示例13: addMultipleLabels

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private void addMultipleLabels(WritableSheet sheet, int col, int row, String s[], WritableCellFormat format) throws RowsExceededException, WriteException {
	if (sheet==null || s==null)
		return;
	
	if (s.length==1)
		sheet.addCell(new Label(col,row,s[0],format));
	else {		
		String result = s[0];
		
		for (int i=1; i<s.length; i++)
			result = result + ", " + s[i];	
		sheet.addCell(new Label(col,row,result,format));
	}
}
 
开发者ID:vagfed,项目名称:hmcScanner,代码行数:15,代码来源:Loader.java

示例14: addLabel

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private void addLabel(HSSFSheet sheet, HSSFCellStyle style,
		 int column, HSSFRow row, String value) 
				 throws WriteException, RowsExceededException {
	HSSFCell cell = row.createCell(column, HSSFCell.CELL_TYPE_STRING);
	cell.setCellStyle(style);
	cell.setCellValue(value);
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:8,代码来源:ExportSurveyStatisticsContentThread.java

示例15: fillSheet

import jxl.write.biff.RowsExceededException; //导入依赖的package包/类
private static void fillSheet(WritableSheet sheet, SortedMap<java.lang.Number, java.lang.Number> data)
		throws WriteException, RowsExceededException {

	int row = 0;
	for (java.lang.Number x : data.keySet()) {
		// first column
		addNumber(sheet, 0, row, x);
		// second column
		addNumber(sheet, 1, row++, data.get(x));
	}
}
 
开发者ID:tesis-dynaware,项目名称:fancy-chart,代码行数:12,代码来源:XlsDao.java


注:本文中的jxl.write.biff.RowsExceededException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。