# Print Preview

## Content



[C1FlexSheet](/componentone/api/wpf/online-flexsheet/dotnet-framework-api/C1.WPF.FlexSheet.4.6.2/C1.WPF.FlexGrid.C1FlexSheet.html) uses [PrintPreview](/componentone/api/wpf/online-flexsheet/dotnet-framework-api/C1.WPF.FlexGrid.4.6.2/C1.WPF.FlexGrid.C1FlexGrid.PrintPreview.html) method to print the data in a worksheet. The parameters of this method allows you to select the document name, scale mode, margin, and maximum number of pages. The code below uses the **PrintPreview** method to provide the preview before printing so that you can view the layout and then print the data:

**vbnet**

```vbnet
Dim scaleMode__1 = ScaleMode.PageWidth
flex.PrintPreview("C1FlexSheet", scaleMode__1, New Thickness(96), Integer.MaxValue)
```

**csharp**

```csharp
var scaleMode = ScaleMode.PageWidth;
flex.PrintPreview("C1FlexSheet", scaleMode, new Thickness(96), int.MaxValue);
```