[]
        
(Showing Draft Content)

ICodabar

Interface ICodabar

All Superinterfaces:
IBarcode, IFontOption, ILabelOption

public interface ICodabar extends IBarcode, IFontOption, ILabelOption
Represents a Codabar barcode.

Codabar is a barcode that uses the characters A, B, C, D, +, -, :, ., /, $, and digits. This interface provides access to Codabar-specific barcode settings in addition to the common barcode, font, and label options defined by IBarcode, IFontOption, and ILabelOption.


 worksheet.getRange("A1").setValue("B2345678B");
 worksheet.getRange("B1").setFormula("=BC_CODABAR(A1)");
 ICodabar codabar = (ICodabar) worksheet.getRange("B1").getValue();
 int nwRatio = codabar.getNwRatio();
 boolean checkDigit = codabar.getCheckDigit();
 
  • Method Details

    • getCheckDigit

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

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

      
       worksheet.getRange("A1").setValue("B2345678B");
       worksheet.getRange("B1").setFormula("=BC_CODABAR(A1)");
       ICodabar codabar = (ICodabar) worksheet.getRange("B1").getValue();
       boolean checkDigit = codabar.getCheckDigit();
       
      Returns:
      true if the 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 Codabar barcode. The supported values are 2 and 3. The default value is 3.

      
       worksheet.getRange("A1").setValue("B2345678B");
       worksheet.getRange("B1").setFormula("=BC_CODABAR(A1)");
       ICodabar codabar = (ICodabar) worksheet.getRange("B1").getValue();
       int nwRatio = codabar.getNwRatio();
       
      Returns:
      The wide and narrow bar ratio value. The return value is 2 or 3.