CellPicture.barcode Property
Portable live barcode settings. Source references are resolved after recalculation and mail merge; use the owning cell or drawing barcode operations to persist edits.
Syntax
barcode?: BarcodeOptions | undefined
Examples
Apply these settings to a workbook owned by an initialized editor or server control.
import type { Workbook } from '@txtextcontrol/tx-sheet-control-server';
function createLabel(book: Workbook) {
const sheet = book.sheets.at(0);
sheet.cell('A1').setText('001042');
sheet.cell('B2').setBarcode({ symbology: 'code128', source: 'A1' });
const drawing = sheet.drawings.addBarcode({ symbology: 'qrCode', source: 'A1', anchor: { cell: 'D2' }, size: { width: 160, height: 160 } });
drawing.updateBarcode({ symbology: 'qrCode', source: 'A1', errorCorrection: 'H' });
}