Home Products Support Blog Contact

Generate Data Matrix barcodes MS Excel spreadsheet, MS Access database and Crystal Reports

Keywords: Data Matrix Barcode, ISO/IEC 16022:2006, GS1 Datamatrix, Deutsche Post Datamatrix Code, MIL-STD-130N

Data-Matrix is a two-dimensional barcode symbology with large data capacity. Its size ranges between 10x10 and 52x52 modules. Each module is black or white.

Data-Matrix can encode ASCII and extended ASCII characters up to 1000. Therefore, Data-Matrix is a good solution for encoding large data in one barcode.

The unique finder pattern and module placement algorithm make data-matrix gorgeous.

Barcodesoft Data-Matrix printing solution used Reed Solomon algorithm to implement ECC 200 level of error checking and correcting.

Data-Matrix ECC200 has 30 pre-defined sizes, as shown below. Users may select one to suit application requirements. Otherwise, Data-Matrix-software will choose the smallest size automatically.

You can integrate our software with MS Access database, MS Excel spreadsheet, and Crystal Reports.

Barcodesoft Data-Matrix-software supports MIL-STD-130N standard and Deutsche-Post-Data-Matrix-Code standard.

Deutsche-Post-Data-Matrix-Code users needs to input NIL(ASCII 0), please use “& #0;” to represent ‘ASCII 0’. 

For GS1-Data-Matrix users, FNC1 character will be added for you automatically when necessary.

Users just need to put a parenthesis before and after each Application Identifier.

For example (01)2356977712251(212)454763970158305
contains Application Identifier (01) and (212).

The scanner will decode the first FNC1 as “]d2”. Other FNC1 will be decoded as GS (ASCII 29).

Demo Data-Matrix Encoder is fully functional even with the “demo” watermark.

Data Matrix ECC200 has 30 symbol size and shape configurations as shown below. User may select one to suit specific application requirement. Otherwise, the smallest possible configuration will be used by Data Matrix encoder.

Index Format Index Format
1 10 x 10 16 64 x 64
2 12 x 12 17 72 x 72
3 14 x 14 18 80 x 80
4 16 x 16 19 88 x 88
5 18 x 18 20 96 x 96
6 20 x 20 21 104 x 104
7 22 x 22 22 120 x 120
8 24 x 24 23 134 x 134
9 26 x 26 24 144 x 144
10 32 x 32 25 8 x 18
11 36 x 36 26 8 x 32
12 40 x 40 27 12 x 26
13 44 x 44 28 12 x 36
14 48 x 48 29 16 x 36
15 52 x 52 30 16 x 48

This is the pricing list of Barcodesoft data matrix barcode package
License Single User 5-User 10-User Site Corporate Developer 5-Developer 10-Developer Unlimited Developer
Price CAD299 CAD399 CAD599 CAD799 CAD999 CAD1199 CAD1399 CAD1999 CAD2999

Generate Data Matrix Barcode in Crystal Reports

1. Open your crystal report. Right click Formula Fields, choose "New..." from the context menu. Type in "BcsDataMatrix1" in the Name textbox, then click "Use Editor".



After Data Matrix encoding process, even a short string might have much more code words than you expect.
While Crystal Reports allows no more than 255 characters in a formula field.
Therefore we have to split Data Matrix code words into separate parts, and concatenate them in a Text Object before apply font BcsDataMatrix.
As for how many formula fields are needed, you can find out by using the following function:

BCSDatamatrixFormulaNoForCR({Test.Data})



2. Create multiple formula fields as listed below if returned value of BCSDatamatrixFormulaNoForCR({Test.Data}) is larger than one. Then put them in sequence within the same Text Object.

BCSDataMatrixEncodeCR({Test.Data}, 1, 0, 0, 0)
BCSDataMatrixEncodeCR({Test.Data}, 2, 0, 0, 0)
BCSDataMatrixEncodeCR({Test.Data}, 3, 0, 0, 0)



The first parameter in the formula field is string to encode.
The second parameter in the formula field is index.

The third parameter of the formula is Format. Its values range between 0 and 30. When set to zero, it means auto-selected format.

The fourth parameter is Encodation method. Its values range between 1 and 6 which stand for the following encodation separately: ASCII, C40, TEXT, X12, EDIFACT, BASE256.

The fifth parameter is GS1 indicator. It is a Boolean indicating whether this is a GS1-compliant barcode. Set it to zero when this is not GS1-datamatrix compliant.

3. Insert a text object in your report. Drag and drop all your formula fields into this text object in sequence. You will see some hex codes in your report. Don't worry! You have NOT applied BCSDatamatrix font typeface yet.



4. Right click Text Object and choose "Format Object" from context menu. Then choose "BcsDatamatrix" as font.



5. Click OK button. You will get data matrix barcode in your report.



Generate Data Matrix Barcode in MS Excel

1. Start Microsoft® Excel® first.

If you are using Excel 2000 or 2003, click menu ===> Tools ==> Macro ===> Security. Choose Low security level.


If you are using Excel 2007 / 2010 / 2013 / 2016 / 2019, click the Microsoft Office Button.

Then click Excel Options, choose Trust Center. In the Macro Settings category, under Macro Settings, choose "Enable all macros" as shown below.



2. Press ALT + F11 to open Microsoft® Visual Basic editor.


3. From Visual Basic editor, choose menu Tools ===> References. It will popup a dialog. Click Browse button and choose cruflbcs.dll from your working folder.
Usually it's under C:\Program File (x86)\CommonFiles\Barcodesoft\Fontutil folder.
Click the checkbox beside crUFLBcs 4.0 Type Library as shown below. Then click OK button.



4. Press Ctrl+M, it will popup a dialog, choose barcodesoft.bas under C:\Program File (x86)\CommonFiles\Barcodesoft\Fontutil folder. Then click "Open".

If you don't find barcodesoft.bas, please download it from Data Matrix.


5. Close Visual Basic and go back to your spreadsheet. Now, you can use the following macro to encode data: datamatrix. When you have lots of data to process, you can just copy and paste the Data Matrix macro to the whole column / row of data. All your Data Matrix will be ready immediately.

=datamatrix(xxx)

Please use cell reference to replace xxx in the formulas as shown below.


6. Right click Cell B1, choose Format Cell from context menu as shown below.


7. Click Font tab and choose BcsDatamatrixS as font typeface as shown below.


8. Click Alignment tab and select "wrap text" as shown below.



9. Click OK and you should be able to see Data Matrix barcode in your Excel spreadsheet now. There might be a small gap between different lines of Data Matrix. However, this won't be an issue when you scan the printed Data Matrix because bcsDatamatrixS true type font is designed to reduce this gap to mininum.



Generate Data Matrix Barcode in MS Access

1. Start Microsoft® Access® first.

If you are using Access 2000 or 2003, click menu ===> Tools ==> Macro ===> Security. Choose Low security level.


If you are using Access 2007 / 2010 / 2013 / 2016 / 2019, click the Microsoft Office Button.

Then click Access Options, choose Trust Center. In the Macro Settings category, under Macro Settings, choose "Enable all macros" as shown below.



2. Press ALT + F11 to open Microsoft® Visual Basic editor.


3. From Visual Basic editor, choose menu Tools ===> References. It will popup a dialog. Click Browse button and choose cruflbcs.dll from your working folder.
Usually it's under C:\Program File (x86)\CommonFiles\Barcodesoft\Fontutil folder.
Click the checkbox beside crUFLBcs 4.0 Type Library as shown below. Then click OK button.



4. Press Ctrl+M, it will popup a dialog, choose barcodesoft.bas under C:\Program File (x86)\CommonFiles\Barcodesoft\Fontutil folder. Then click "Open".

If you don't find barcodesoft.bas, please download it from data matrix.


5. Close Visual Basic and go back to your Access database. Now, create a report in Design view and type in one of the following macros in the field where you want to show data matrix barcode before apply font typeface, such as BcsDatamatrix:
=datamatrix([data.code])

Please notice that 'data' is the Table name, 'code' is the Field name.



6. Right click the field you want to display data matrix barcode. Choose Properties from context menu. Apply one of the appropriate font typefaces to the field, such as BcsDatamatrix.