本文整理汇总了Java中org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument类的典型用法代码示例。如果您正苦于以下问题:Java OdfSpreadsheetDocument类的具体用法?Java OdfSpreadsheetDocument怎么用?Java OdfSpreadsheetDocument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OdfSpreadsheetDocument类属于org.odftoolkit.odfdom.doc包,在下文中一共展示了OdfSpreadsheetDocument类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: layoutGeneratedOdsFile
import org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument; //导入依赖的package包/类
public static File layoutGeneratedOdsFile(File generatedOdsFile) {
File odsOutFile = new File(System.getProperty("java.io.tmpdir") + File.separator + "Layouted_" + generatedOdsFile.getName());
try {
OdfSpreadsheetDocument spreadsheet = OdfSpreadsheetDocument.loadDocument(generatedOdsFile);
List<OdfTable> tableList = spreadsheet.getTableList();
for (OdfTable table : tableList) {
table = formatCategories(table);
table = formatNodes(table);
}
spreadsheet.save(odsOutFile);
} catch (Exception ex) {
logger.error("Layouting of the OdsFile went wrong.", ex);
}
return odsOutFile;
}
开发者ID:opennms-forge,项目名称:poc-opennms-spreadsheet-category-manager,代码行数:18,代码来源:SpreadsheetLayouter.java
示例2: getNodeToCategoryMappingsFromFile
import org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument; //导入依赖的package包/类
public Collection<NodeToCategoryMapping> getNodeToCategoryMappingsFromFile() {
Map<String, NodeToCategoryMapping> nodesToCategories = new HashMap<>();
try {
OdfSpreadsheetDocument spreadsheet = OdfSpreadsheetDocument.loadDocument(this.m_odsFile);
for (OdfTable table : spreadsheet.getTableList()) {
nodesToCategories = getNodeToCategoryMappingsFromTable(nodesToCategories, table);
}
} catch (Exception ex) {
logger.error("Reading spreadsheet went wrong", ex);
}
return nodesToCategories.values();
}
开发者ID:opennms-forge,项目名称:poc-opennms-spreadsheet-category-manager,代码行数:17,代码来源:SpreadsheetReader.java
示例3: setupOutputDocument
import org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument; //导入依赖的package包/类
void setupOutputDocument() {
try {
outputDocument = OdfSpreadsheetDocument.newSpreadsheetDocument();
contentDom = outputDocument.getContentDom();
stylesDom = outputDocument.getStylesDom();
contentAutoStyles = contentDom.getOrCreateAutomaticStyles();
stylesOfficeStyles = outputDocument.getOrCreateDocumentStyles();
officeSpreadsheet = outputDocument.getContentRoot();
} catch (Exception e) {
System.err.println("Unable to create output file.");
System.err.println(e.getMessage());
outputDocument = null;
}
}
开发者ID:mgerlich,项目名称:MetFusion,代码行数:15,代码来源:ODFOutputHandler.java
示例4: OdfWorkbook
import org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument; //导入依赖的package包/类
public OdfWorkbook(String filename, String encoding) throws KettleException {
this.filename = filename;
this.encoding = encoding;
try {
document = OdfSpreadsheetDocument.loadDocument(KettleVFS.getInputStream(filename));
} catch(Exception e) {
throw new KettleException(e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:OdfWorkbook.java
示例5: OdfWorkbook
import org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument; //导入依赖的package包/类
public OdfWorkbook( String filename, String encoding ) throws KettleException {
this.filename = filename;
this.encoding = encoding;
try {
document = OdfSpreadsheetDocument.loadDocument( KettleVFS.getInputStream( filename ) );
} catch ( Exception e ) {
throw new KettleException( e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:OdfWorkbook.java
注:本文中的org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论