# BarcodeOptions.version Property

> BarcodeOptions.version property in the TX Sheet Control TypeScript API for the browser: QR version 1–40. Omit to choose the smallest version that fits.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > BarcodeOptions > BarcodeOptions.version Property
- **425 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/version-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/version-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/version-property/llms-full.txt

---

QR version 1–40. Omit to choose the smallest version that fits.

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

### Syntax

```typescript
version?: number
```

### 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.

### Examples

Create a barcode from application data and retain its editable workbook settings.

```typescript
import { Workbook } from '@txtextcontrol/tx-sheet-control';
import type { BarcodeOptions } from '@txtextcontrol/tx-sheet-control';

const book = new Workbook();
const sheet = book.sheets.at(0);
sheet.cell('A1').setText('https://example.com/invoice/1042');
const options: BarcodeOptions = {
    symbology: 'qrCode', source: 'A1', showText: false,
    foreground: '#163b63', background: '#ffffff', errorCorrection: 'M', version: 3,
};
sheet.cell('B2').setBarcode(options);
sheet.cell('D2').setBarcode({ symbology: 'code128', value: '001042', showText: true });
```

---

## Nearby

- **Previous:** [BarcodeOptions.errorCorrection Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodeoptions/errorcorrection-property/llms-full.txt)
- **Next:** [BarcodeDrawingOptions Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodedrawingoptions/llms-full.txt)
