DrawingCollection.addBarcode Method
Inserts a movable barcode or QR code. Missing source/value reads its anchor cell.
Package: @txtextcontrol/tx-sheet-control.
Syntax
owner.addBarcode(options);
Examples
Use an existing workbook as book.
import { Workbook as ExampleWorkbook } from '@txtextcontrol/tx-sheet-control';
const book = new ExampleWorkbook();
book.sheets.at(0).drawings.addBarcode({
symbology: 'qrCode', source: '=A2', anchor: { cell: 'D2' },
size: { width: 160, height: 160 }
});
Remarks
Settings are detached snapshots. Cell values and formulas remain available beneath the symbol. Sources resolve after calculation and mail merge. See Barcodes and QR Codes for validation, supported payloads and XLSX behavior.