org.ttzero.excel.entity.e3.SheetLayoutParser 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;
/**
* 5.96 SHEETLAYOUT
*
* This record stores the colour of the tab below the sheet
* containing the sheet name. This feature is only available
* in Excel 10.0 (Excel XP) and later.
*
* @author guanquan.wang on 2019-02-05
*/
public class SheetLayoutParser {
public static short get(Block block) {
// Not used
block.skip(10);
// Unknown data: 14H 00H 00H 00H
// FIXME check
block.nextInt();
// Colour index (➜5.74) for sheet name tab
short colorIndex = block.nextShort();
// Not used
block.skip(2);
return colorIndex;
}
public static short getId() {
return ParserIdentifier.SHEETLAYOUT;
}
}