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-5.2.3.jar?
What Is poi-5.2.3.jar?
✍: FYIcenter.com
poi-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-5.2.3.jar supports Apache POI components that read and write Microsoft's OLE 2 Compound document format, which is used in early versions of Microsoft Office tools like Word 97, Excel 97, PowerPoint 97, etc.
poi-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-5.2.3.jar Target JDK version: 9 File name: poi.jar, poi-5.2.3.jar File size: 2964641 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-5.2.3.jar:
⏎ org/apache/poi/ss/formula/atp/Switch.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.formula.atp;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.BoolEval;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.OperandResolver;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import static org.apache.poi.ss.formula.eval.RelationalOperationEval.EqualEval;
/**
* Implementation of 'Analysis Toolpak' Excel function SWITCH()<br>
* <p>
* The SWITCH function evaluates one value (called the expression) against a list of values, and returns the result corresponding to the first matching value.
* If there is no match, an optional default value may be returned.
* <p>
* <b>Syntax</b><br>
* <b>SWITCH</b>SWITCH(expression, value1, result1, [default or value2, result2],…[default or value3, result3])
*
* @author Pieter Degraeuwe
*/
public final class Switch implements FreeRefFunction {
public static final FreeRefFunction instance = new Switch();
private Switch() {
// enforce singleton
}
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
if (args.length < 3) return ErrorEval.NA;
final ValueEval expression;
try {
expression = OperandResolver.getSingleValue(args[0], ec.getRowIndex(), ec.getColumnIndex());
} catch (Exception e) {
return ErrorEval.NA;
}
for (int i = 1; i < args.length; i = i+2) {
try {
ValueEval value = OperandResolver.getSingleValue(args[i], ec.getRowIndex(), ec.getColumnIndex());
ValueEval result = args[i+1];
//ValueEval result = OperandResolver.getSingleValue(args[i+1],ec.getRowIndex(),ec.getColumnIndex()) ;
final ValueEval evaluate = EqualEval.evaluate(new ValueEval[]{expression, value}, ec.getRowIndex(), ec.getColumnIndex());
if (evaluate instanceof BoolEval) {
BoolEval boolEval = (BoolEval) evaluate;
final boolean booleanValue = boolEval.getBooleanValue();
if (booleanValue) {
return result;
}
}
} catch (EvaluationException e) {
return ErrorEval.NA;
}
if (i + 2 == args.length-1) {
//last value in args is the default one
return args[args.length-1];
}
}
/*
if (args.length % 2 != 0) {
return ErrorEval.VALUE_INVALID;
}
for (int i = 0; i < args.length; i = i + 2) {
BoolEval logicalTest = (BoolEval) args[i];
if (logicalTest.getBooleanValue()) {
return args[i + 1];
}
}
*/
return ErrorEval.NA;
}
}
⏎ org/apache/poi/ss/formula/atp/Switch.java
Or download all of them as a single archive file:
File name: poi-5.2.3-src.zip File size: 2479830 bytes Release date: 2022-09-09 Download
⇒ What Is poi-ooxml-5.2.3.jar?
⇐ What Is poi-bin-5.2.3-20220909.zip?
2017-04-04, ≈312🔥, 0💬
Popular Posts:
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
MP3SPI is a Java Service Provider Interface that adds MP3 (MPEG 1/2/2.5 Layer 1/2/3) audio format su...
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....