# Get the content of a file and create a QVD file

Get the content of a file and create a QVD file by using the [GetIncludeFileContent method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-doc-getincludefilecontent.htm) and the [SetScript method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-doc-setscript.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/EditDataLoadScript/get-content-file-and-create-QVD-file.htm)

#### The goal is to get the content of a text file and use this content to create a QVD file.

The handle of the app is 1.

The text file CountryRegionSales.txt contains the following information:

```
New_Table:
```

```
LOAD * Inline
```

```
[Country, Region, Sales
```

```
SWE, EUR, 3.7
```

```
BEL, EUR, 0.4
```

NOR, EUR, 3.7

JAP, ASA, 3.6

CHN, ASA, 5.6

USA, NOA, 10.2];

STORE New\_Table into File.qvd (qvd);

1. Get the content of the file CountryRegionSales.txt.

The client sends:

{ "jsonrpc": "2.0", "id": 2, "method": "GetIncludeFileContent", "handle": 1, "params": ["lib://CONNECTION\_NAME\\CountryRegionSales.txt" ]}

The engine returns:

{ "jsonrpc": "2.0", "id": 2, "result": { "qContent": "New\_Table:\r\nLOAD \* Inline\r\n[Country, Region, Sales\r\nSWE, EUR, 3.7\r\nBEL, EUR, 0.4\r\nNOR, EUR, 3.7\r\nJAP, ASA, 3.6\r\nCHN, ASA, 5.6\r\nUSA, NOA, 10.2];\r\nSTORE New\_Table into File.qvd (qvd);" } }

The content of the file is returned.

2. Using the content of the file, write a script:

The client sends:

{ "jsonrpc": "2.0", "id": 3, "method": "SetScript", "handle": 1, "params": [ "New\_Table:\r\nLOAD \* Inline\r\n[Country, Region, Sales\r\nSWE, EUR, 3.7\r\nBEL, EUR, 0.4\r\nNOR, EUR, 3.7\r\nJAP, ASA, 3.6\r\nCHN, ASA, 5.6\r\nUSA, NOA, 10.2];\r\nSTORE New\_Table into File.qvd (qvd);" ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": {}, "change": [ 1 ] }

A QVD file is created and contains a table with three columns (Country, Region and Sales) and six rows.