DrawingHandle.updateBarcode Method
Replaces all barcode settings while retaining identity and geometry. An ordinary drawing rejects this operation.
Package: @txtextcontrol/tx-sheet-control-server.
Syntax
updateBarcode(options: BarcodeOptions): this
Example
Use an existing workbook as book.
import { ServerSheetControl as ExampleServer } from '@txtextcontrol/tx-sheet-control-server';
const exampleControl = new ExampleServer();
const book = exampleControl.workbook;
const qr = book.sheets.at(0).drawings.addBarcode({ symbology: 'qrCode', value: 'ORDER-1' });
qr.updateBarcode({ symbology: 'qrCode', source: '=A2', errorCorrection: 'H' });
exampleControl.destroy();
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.