[]
        
(Showing Draft Content)

ICode39

Interface ICode39

All Superinterfaces:
IBarcode, IFontOption, ILabelOption

public interface ICode39 extends IBarcode, IFontOption, ILabelOption
Represents a Code 39 barcode.

Code 39 is a linear barcode that uses a total of nine bars to represent each symbol, including numeric characters, upper-case characters, and some special characters ("%","*","$","/",".","-","+"). This interface also provides barcode, font, and label options through IBarcode, IFontOption, and ILabelOption.


 worksheet.getRange("A1").setValue("CODE39-100");
 worksheet.getRange("B1").setFormula("=BC_CODE39(A1)");
 ICode39 code39 = (ICode39) worksheet.getRange("B1").getValue();
 boolean fullASCII = code39.getFullASCII();
 
  • Method Details

    • getLabelWithStartAndStopCharacter

      boolean getLabelWithStartAndStopCharacter()
      Gets whether to show the start and stop character in the label.

      The default value is false.

      
       worksheet.getRange("A1").setValue("CODE39-100");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1,,,,,\"true\")");
       ICode39 code39 = (ICode39) worksheet.getRange("B1").getValue();
       boolean labelWithStartAndStopCharacter = code39.getLabelWithStartAndStopCharacter();
       
      Returns:
      true if the label shows the start and stop character; otherwise, false.
    • getCheckDigit

      boolean getCheckDigit()
      Gets whether the Code 39 symbol requires a check digit.

      Specifies whether the symbol needs a check digit. The default value is false.

      
       worksheet.getRange("A1").setValue("CODE39-100");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1)");
       ICode39 code39 = (ICode39) worksheet.getRange("B1").getValue();
       boolean checkDigit = code39.getCheckDigit();
       
      Returns:
      true if the Code 39 symbol requires a check digit; otherwise, false.
    • getNwRatio

      int getNwRatio()
      Gets the wide and narrow bar ratio.

      This value represents the ratio between wide bars and narrow bars in the Code 39 barcode. The supported values are 2 and 3. The default value is 3.

      
       worksheet.getRange("A1").setValue("CODE39-100");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1)");
       ICode39 code39 = (ICode39) worksheet.getRange("B1").getValue();
       int nwRatio = code39.getNwRatio();
       
      Returns:
      The wide and narrow bar ratio value. The return value is 2 or 3.
    • getFullASCII

      boolean getFullASCII()
      Gets whether full ASCII is supported for Code 39.

      When this property is true, the barcode can encode ASCII characters beyond the standard Code 39 character set. The default value is false.

      
       worksheet.getRange("A1").setValue("Code39+100");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1,,,,,,,,TRUE)");
       ICode39 code39 = (ICode39) worksheet.getRange("B1").getValue();
       boolean fullASCII = code39.getFullASCII();
       
      Returns:
      true if full ASCII is supported for Code 39; otherwise, false.