//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; ButtonCellType buttonCellType = new ButtonCellType { Text = "Button", ButtonBackColor = "Azure", MarginLeft = 10, MarginRight = 10 }; worksheet.CellType = buttonCellType;
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim buttonCellType As New ButtonCellType With { .Text = "Button", .ButtonBackColor = "Azure", .MarginLeft = 10, .MarginRight = 10 } worksheet.CellType = buttonCellType