Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is poi-excelant-5.2.3.jar?
What Is poi-excelant-5.2.3.jar?
✍: FYIcenter.com
poi-excelant-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which
provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-excelant-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-excelant-5.2.3.jar Target JDK version: 9 Dependency: poi.jar File name: poi-excelant.jar, poi-excelant-5.2.3.jar File size: 28800 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-excelant-5.2.3.jar:
⏎ org/apache/poi/ss/excelant/ExcelAntTask.java
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.ss.excelant;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.LinkedList;
import java.util.Locale;
import org.apache.poi.ss.excelant.util.ExcelAntWorkbookUtil;
import org.apache.poi.ss.excelant.util.ExcelAntWorkbookUtilFactory;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
/**
* Ant task class for testing Excel workbook cells.
*/
public class ExcelAntTask extends Task {
public static final String VERSION = "0.5.0" ;
private String excelFileName ;
private boolean failOnError;
private ExcelAntWorkbookUtil workbookUtil ;
private ExcelAntPrecision precision ;
private LinkedList<ExcelAntTest> tests ;
private LinkedList<ExcelAntUserDefinedFunction> functions ;
public ExcelAntTask() {
tests = new LinkedList<>() ;
functions = new LinkedList<>() ;
}
public void addPrecision( ExcelAntPrecision prec ) {
precision = prec ;
}
public void setFailOnError( boolean value ) {
failOnError = value ;
}
public void setFileName( String fileName ) {
excelFileName = fileName ;
}
public void addTest( ExcelAntTest testElement ) {
tests.add( testElement ) ;
}
public void addUdf( ExcelAntUserDefinedFunction def ) {
functions.add( def ) ;
}
@Override
public void execute() throws BuildException {
checkClassPath();
int totalCount = 0 ;
int successCount = 0 ;
StringBuilder versionBffr = new StringBuilder() ;
versionBffr.append( "ExcelAnt version " ) ;
versionBffr.append( VERSION ) ;
versionBffr.append( " Copyright 2011" ) ;
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy", Locale.ROOT ) ;
double currYear = Double.parseDouble( sdf.format( new Date() ) );
if( currYear > 2011 ) {
versionBffr.append( "-" ) ;
versionBffr.append( currYear ) ;
}
log( versionBffr.toString(), Project.MSG_INFO ) ;
log( "Using input file: " + excelFileName, Project.MSG_INFO ) ;
workbookUtil = ExcelAntWorkbookUtilFactory.getInstance(excelFileName);
for (ExcelAntTest test : tests) {
log("executing test: " + test.getName(), Project.MSG_DEBUG);
if (workbookUtil == null) {
workbookUtil = ExcelAntWorkbookUtilFactory.getInstance(excelFileName);
}
for (ExcelAntUserDefinedFunction eaUdf : functions) {
try {
workbookUtil.addFunction(eaUdf.getFunctionAlias(), eaUdf.getClassName());
} catch (Exception e) {
throw new BuildException(e.getMessage(), e);
}
}
test.setWorkbookUtil(workbookUtil);
if (precision != null && precision.getValue() > 0) {
log("setting precision for the test " + test.getName(), Project.MSG_VERBOSE);
test.setPrecision(precision.getValue());
}
test.execute();
if (test.didTestPass()) {
successCount++;
} else {
if (failOnError) {
throw new BuildException("Test " + test.getName() + " failed.");
}
}
totalCount++;
workbookUtil = null;
}
if( !tests.isEmpty() ) {
log( successCount + "/" + totalCount + " tests passed.", Project.MSG_INFO );
}
workbookUtil = null;
}
/**
* ExcelAnt depends on external libraries not included in the Ant distribution.
* Give user a sensible message if any if the required jars are missing.
*/
private void checkClassPath(){
try {
Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
Class.forName("org.apache.poi.ss.usermodel.WorkbookFactory");
} catch (Exception e) {
throw new BuildException(
"The <classpath> for <excelant> must include poi.jar and poi-ooxml.jar " +
"if not in Ant's own classpath. Processing .xlsx spreadsheets requires " +
"additional poi-ooxml-lite.jar, xmlbeans.jar" ,
e, getLocation());
}
}
}
⏎ org/apache/poi/ss/excelant/ExcelAntTask.java
Or download all of them as a single archive file:
File name: poi-excelant-5.2.3-src.zip File size: 21795 bytes Release date: 2022-09-09 Download
⇒ What Is poi-scratchpad-5.2.3.jar?
⇐ What Is poi-ooxml-5.2.3.jar?
2017-03-22, ∼7759🔥, 0💬
Popular Posts:
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
How to download and install javamail-1_2.zip? The JavaMail API is a set of abstract APIs that model ...
How to download and install xml-commons External Source Package? The source package contains Java so...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
What Is poi-ooxml-5.2.3.jar? poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which...