//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; worksheet.Range["J12"].Value = 1; //Set the view mode of the worksheet to PageBreakPreview. worksheet.SheetView.ViewType = ViewType.PageBreakPreview; //Modify the zoom of the PageBreakPreview to 80%. worksheet.SheetView.Zoom = 80; // Save to an excel file workbook.Save("ConfigPageBreakPreview.xlsx");
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) worksheet.Range("J12").Value = 1 'Set the view mode of the worksheet to PageBreakPreview. worksheet.SheetView.ViewType = ViewType.PageBreakPreview 'Modify the zoom of the PageBreakPreview to 80%. worksheet.SheetView.Zoom = 80 ' save to an excel file workbook.Save("ConfigPageBreakPreview.xlsx")