[]
Serializable, Comparable<BarcodeType>, Constable使用此枚举可识别 IBarcode 实例所表示的条形码符号体系,例如 QRCode、 DataMatrix 或 PDF417。它包括库支持的二维条形码类型和线性条形码类型。
worksheet.getRange("A1").setFormula("=BC_QRCODE(\"https://www.example.com\")");
IBarcode barcode = (IBarcode) worksheet.getRange("A1").getValue();
BarcodeType type = barcode.getCodeType();
boolean isQrCode = type == BarcodeType.QRCode;
Enum.EnumDesc<E extends Enum<E>>static BarcodeTypeforValue(int value) intgetValue()static BarcodeTypestatic BarcodeType[]values()此条形码类型最多可编码 7,366 个字符。
Data Matrix 是一种高密度二维条形码,由按正方形或矩形矩阵排列的黑白模块组成。
PDF417 是一种常用的高密度二维码制,最多可编码 1108 字节的信息。此条形码由一组堆叠的较小条形码组成,支持完整的 ASCII 字符集,并且最多可编码 2725 个数据字符。
EAN-8 仅支持数字字符,由 7 位数据数字和 1 位校验数字组成。
EAN-13 仅使用数字字符,并编码 12 位数字加 1 位校验位。如果值只包含 12 位数字,则会自动计算第 13 位数字。如果值包含 13 位数字,则会验证校验位;如果校验位不正确,则会引发错误。
Code 39 是一种线性条形码,使用数字字符、大写字母以及特殊字符,例如 %、 *、 $、 /、.、 - 和 +。
Code 93 支持大写字母、数字字符以及特殊字符 %, $, *, /, ., - 和 +。它通常用于编码补充投递信息。
它用于编码完整的 ASCII 字符集。
Codabar 使用字符 A, B, C, D, +, -, :, ,, / 和数字。
GS1-128 是 Code 128 的一种变体,支持完整的 ASCII 字符集。它在第一个字符位置使用 FNC1 字符,并通过一系列应用标识符对数据进行编码。
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null使用此方法可将从 getValue() 获取的整数值转换回对应的 BarcodeType 常量。
value - 表示枚举常量的整数值。BarcodeType 枚举常量。ArrayIndexOutOfBoundsException - 如果 value 小于 0 或大于等于枚举常量的数量。