All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ttzero.excel.entity.e3.GlobalsSetting Maven / Gradle / Ivy

/*
 * Copyright (c) 2019-2020, [email protected] All Rights Reserved.
 *
 * Licensed 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.ttzero.excel.entity.e3;

import org.ttzero.excel.entity.style.Styles;
import org.ttzero.excel.reader.SharedStrings;

import java.io.Closeable;
import java.io.IOException;
import java.util.Arrays;


/**
 * The Workbook Globals Sub-stream
 *
 * @author guanquan.wang on 2019-02-27
 */
public class GlobalsSetting implements Closeable {
    int firstSid;
    short hash;
    /**
     * This record specifies the base date for displaying date values.
     * All dates are stored as count of days past this base date. In
     * BIFF2-BIFF4 this record is part of the Calculation Settings
     * Block (➜4.3). In BIFF5-BIFF8 it is stored in the Workbook
     * Globals Substream.
     * 

* 0 = Base date is 1899-Dec-31 (the cell value 1 represents 1900-Jan-01); * 1 = Base date is 1904-Jan-01 (the cell value 1 represents 1904-Jan-02) */ short dataMode; /** * This record stores if formulas use the real cell values for calculation * or the values displayed on the screen. In BIFF2-BIFF4 this record is part * of the Calculation Settings Block (➜4.3). In BIFF5-BIFF8 it is stored in * the Workbook Globals Substream. *

* 0 = Use displayed values; 1 = Use real cell values */ short precision; short bookbool; String writeAccess; SheetInfo[] sheets; // NumFmt[] numFmts; /** * The Shared String Table */ SharedStrings sst; /** * The {@link Styles} */ Styles styles; /** * Storage a drawing group block index */ BlockIndex msoDrawingGroupBlockIndex; public int getFirstSid() { return firstSid; } public short getHash() { return hash; } public short getDataMode() { return dataMode; } public short getPrecision() { return precision; } public short getBookbool() { return bookbool; } public String getWriteAccess() { return writeAccess; } public SheetInfo[] getSheets() { return sheets; } // public NumFmt[] getNumFmts() { // return numFmts; // } public BlockIndex getMsoDrawingGroupBlockIndex() { return msoDrawingGroupBlockIndex; } @Override public String toString() { return " FirstSid: " + firstSid + " Hash: " + hash + " DataMode: " + dataMode + " Precision: " + precision + " Bookbool: " + bookbool + " WriteAccess: " + writeAccess + " Sheets: " + Arrays.toString(sheets) // + " numFmts: " + Arrays.toString(numFmts) + " SST: {" + sst + "}" ; } @Override public void close() throws IOException { // Close Shared String Table if (sst != null) { sst.close(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy