# Disable Export of a Column

When exporting with **ExportToXlsx** or **ExportToPdf** methods you can choose which columns to export by setting the **ExcludedColumns** property for the **GridViewDocumentExportOptions**. The property was introduced in **Q3 2015 SP1**. When a given column is added to this collection, it will not be exported.

**Example 4: Disabling the export of a particular column:**

```C#
var opt = new GridViewDocumentExportOptions()
{
    ShowColumnHeaders = true,
};
opt.ExcludedColumns.Add(grid.Columns[0]);

gridViewExport.ExportToPdf(stream, opt);
```

```VB.NET
Dim opt = New GridViewDocumentExportOptions() With { _
	Key .ShowColumnHeaders = True _
}
opt.ExcludedColumns.Add(grid.Columns(0))

gridViewExport.ExportToPdf(stream, opt)
```
