[]
        
(Showing Draft Content)

ICode128

Interface ICode128

All Superinterfaces:
IBarcode, IFontOption, ILabelOption

public interface ICode128 extends IBarcode, ILabelOption, IFontOption
Represents a Code 128 barcode.

The 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();
 
  • Method Details

    • getCodeSet

      String getCodeSet()
      Gets the code set used by the Code 128 barcode.

      This 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();
       
      Returns:
      The code set used by the Code 128 barcode.