# DrawingHandle.updateBarcode Method

> DrawingHandle.updateBarcode method in the TX Sheet Control JavaScript API for Node.js, with its syntax and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > DrawingHandle > DrawingHandle.updateBarcode Method
- **347 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/drawinghandle/updatebarcode-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/drawinghandle/updatebarcode-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/drawinghandle/updatebarcode-method/llms-full.txt

---

Replaces all barcode settings while retaining identity and geometry. An ordinary drawing rejects this operation.

Package: `@txtextcontrol/tx-sheet-control-server`.

### Syntax

```javascript
owner.updateBarcode(options);
```

### Examples

Use an existing workbook as `book`.

```javascript
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](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/barcodes/llms-full.txt) for validation, supported payloads and XLSX behavior.

---

## Nearby

- **Previous:** [DrawingHandle.barcode Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/drawinghandle/barcode-property/llms-full.txt)
- **Next:** [FontRegistry Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/llms-full.txt)
