[]
        
(Showing Draft Content)

IDataMatrix

Interface IDataMatrix

All Superinterfaces:
IBarcode

public interface IDataMatrix extends IBarcode
DataMatrix barcode is a high density, two-dimensional barcode with square modules typically arranged in a square or a rectangular matrix pattern.

This interface represents a DataMatrix barcode value returned from a worksheet cell. In addition to the common barcode properties defined by IBarcode, it provides access to DataMatrix-specific settings such as the ECC mode, symbol size, encoding mode, and structured append information.


 worksheet.getRange("A1").setValue("Test");
 worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
 IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
 EccMode eccMode = dataMatrix.getEccMode();
 
  • Method Details

    • getEccMode

      EccMode getEccMode()
      Gets the error correction mode.

      This method returns the error correction mode used by the current DataMatrix barcode, such as EccMode.ECC000 or EccMode.ECC200.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       EccMode eccMode = dataMatrix.getEccMode();
       
      Returns:
      The ECC mode of the current DataMatrix barcode.
    • getEcc200SymbolSize

      String getEcc200SymbolSize()
      Gets the size of the ECC200 symbol.

      This method returns the symbol size string used by a DataMatrix barcode when the ECC mode is ECC200.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       String symbolSize = dataMatrix.getEcc200SymbolSize();
       
      Returns:
      The ECC200 symbol size string.
    • getEcc200EndcodingMode

      String getEcc200EndcodingMode()
      Gets the ECC200 encoding mode.

      This method returns the encoding mode string used by a DataMatrix barcode when the ECC mode is ECC200.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       String encodingMode = dataMatrix.getEcc200EndcodingMode();
       
      Returns:
      The ECC200 encoding mode string.
    • getEcc00140SymboleSize

      String getEcc00140SymboleSize()
      Gets the size of the ECC000-140 symbol.

      This value corresponds to the ECC000-140 symbol size specified for the DataMatrix barcode.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"ECC000\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       String symbolSize = dataMatrix.getEcc00140SymboleSize();
       
      Returns:
      The ECC000-140 symbol size. The automatic size is represented by "auto".
    • getStructureAppend

      boolean getStructureAppend()
      Gets a value indicating whether the current symbol is part of structured append symbols.

      Structured append is only supported by ECC200.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",TRUE,1,10,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       boolean structureAppend = dataMatrix.getStructureAppend();
       
      Returns:
      true if the current symbol is part of structured append symbols; otherwise, false.
    • getStructureNumber

      int getStructureNumber()
      Gets the structure number of the current symbol within the structured append symbols.

      This property is used only when the ECC mode is EccMode.ECC200.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",TRUE,1,10,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       int structureNumber = dataMatrix.getStructureNumber();
       
      Returns:
      The structure number of the current symbol in the structured append symbol group.
    • getFileIdentifier

      int getFileIdentifier()
      Gets the file identifier of a related group of structured append symbols.

      This property applies to ECC200 structured append symbols. The valid file identifier value is within the range [1, 254]. A value of 0 indicates that the file identifier is calculated automatically.

      
       worksheet.getRange("A1").setValue("Test");
       worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",TRUE,1,10,4,4,4,4)");
       IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
       int fileIdentifier = dataMatrix.getFileIdentifier();
       
      Returns:
      The file identifier of the related structured append symbol group. Returns 0 if the file identifier is calculated automatically.