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/eval/forked/ForkedEvaluationCell.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.eval.forked;

import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.formula.eval.BlankEval;
import org.apache.poi.ss.formula.eval.BoolEval;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;

/**
 * Represents a cell being used for forked evaluation that has had a value set different from the
 * corresponding cell in the shared master workbook.
 */
final class ForkedEvaluationCell implements EvaluationCell {

    private final EvaluationSheet _sheet;
    /** corresponding cell from master workbook */
    private final EvaluationCell _masterCell;
    private boolean _booleanValue;
    private CellType _cellType;
    private int _errorValue;
    private double _numberValue;
    private String _stringValue;

    public ForkedEvaluationCell(ForkedEvaluationSheet sheet, EvaluationCell masterCell) {
        _sheet = sheet;
        _masterCell = masterCell;
        // start with value blank, but expect construction to be immediately
        setValue(BlankEval.instance); // followed by a proper call to setValue()
    }

    @Override
    public Object getIdentityKey() {
        return _masterCell.getIdentityKey();
    }

    public void setValue(ValueEval value) {
        Class<? extends ValueEval> cls = value.getClass();

        if (cls == NumberEval.class) {
            _cellType = CellType.NUMERIC;
            _numberValue = ((NumberEval)value).getNumberValue();
            return;
        }
        if (cls == StringEval.class) {
            _cellType = CellType.STRING;
            _stringValue = ((StringEval)value).getStringValue();
            return;
        }
        if (cls == BoolEval.class) {
            _cellType = CellType.BOOLEAN;
            _booleanValue = ((BoolEval)value).getBooleanValue();
            return;
        }
        if (cls == ErrorEval.class) {
            _cellType = CellType.ERROR;
            _errorValue = ((ErrorEval)value).getErrorCode();
            return;
        }
        if (cls == BlankEval.class) {
            _cellType = CellType.BLANK;
            return;
        }
        throw new IllegalArgumentException("Unexpected value class (" + cls.getName() + ")");
    }
    public void copyValue(Cell destCell) {
        switch (_cellType) {
            case BLANK:   destCell.setBlank();                           return;
            case NUMERIC: destCell.setCellValue(_numberValue);           return;
            case BOOLEAN: destCell.setCellValue(_booleanValue);          return;
            case STRING:  destCell.setCellValue(_stringValue);           return;
            case ERROR:   destCell.setCellErrorValue((byte)_errorValue); return;
            default: throw new IllegalStateException("Unexpected data type (" + _cellType + ")");
        }
    }

    private void checkCellType(CellType expectedCellType) {
        if (_cellType != expectedCellType) {
            throw new RuntimeException("Wrong data type (" + _cellType + ")");
        }
    }

    @Override
    public CellType getCellType() {
        return _cellType;
    }
    @Override
    public boolean getBooleanCellValue() {
        checkCellType(CellType.BOOLEAN);
        return _booleanValue;
    }
    @Override
    public int getErrorCellValue() {
        checkCellType(CellType.ERROR);
        return _errorValue;
    }
    @Override
    public double getNumericCellValue() {
        checkCellType(CellType.NUMERIC);
        return _numberValue;
    }
    @Override
    public String getStringCellValue() {
        checkCellType(CellType.STRING);
        return _stringValue;
    }
    @Override
    public EvaluationSheet getSheet() {
        return _sheet;
    }
    @Override
    public int getRowIndex() {
        return _masterCell.getRowIndex();
    }
    @Override
    public int getColumnIndex() {
        return _masterCell.getColumnIndex();
    }

    @Override
    public CellRangeAddress getArrayFormulaRange() {
        return _masterCell.getArrayFormulaRange();
    }

    @Override
    public boolean isPartOfArrayFormulaGroup() {
        return _masterCell.isPartOfArrayFormulaGroup();
    }
    /**
     * @return cell type of cached formula result
     */
    @Override
    public CellType getCachedFormulaResultType() {
        return _masterCell.getCachedFormulaResultType();
    }
}

org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.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?

Downloading and Installing Apache POI Java Library

⇑⇑ FAQ for Apache POI (Poor Obfuscation Implementation)

2017-04-04, 56073👍, 0💬