[]
IBarcode, IFontOption, ILabelOptionThe Code 128 barcode is a linear barcode that represents high-density linear symbology to encode text, numbers, various functions and the entire 128 ASCII character set (from ASCII 0 to ASCII 127). It is widely used in enterprise internal management, production processes, and logistics control systems.
Instances of this interface are typically returned from a cell whose value is generated by the BC_CODE128 formula. This interface also includes barcode, label, and font settings through IBarcode, ILabelOption, and IFontOption.
worksheet.getRange("A1").setValue("123456789");
worksheet.getRange("B1").setFormula("=BC_CODE128(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",1,\"bottom\",\"auto\",,\"normal\",\"normal\",\"none\",\"center\",12,10,10,0,0)");
ICode128 code128 = (ICode128) worksheet.getRange("B1").getValue();
String codeSet = code128.getCodeSet();
getBackgroundColor, getCodeType, getColor, getQuietZoneBottom, getQuietZoneLeft, getQuietZoneRight, getQuietZoneTop, getValuegetFontFamily, getFontSize, getFontStyle, getFontTextAlign, getFontTextDecoration, getFontWeightgetLabelPosition, getShowLabelThis value determines which Code 128 code set is used to encode the barcode text. Supported values are "auto", "A", "B", and "C". The default value is "auto".
worksheet.getRange("A1").setValue("123456789");
worksheet.getRange("B1").setFormula("=BC_CODE128(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",1,\"bottom\",\"auto\",,\"normal\",\"normal\",\"none\",\"center\",12,10,10,0,0)");
ICode128 code128 = (ICode128) worksheet.getRange("B1").getValue();
String codeSet = code128.getCodeSet();