Input value to cell located in the first column and row of range var range2 = worksheet.Range(3, 3, 5, 5) Get a Range from start/stop row and column id. Select Range from Row/Column Id in Worksheet Select Range from Single Cell in Worksheet xlsx spreadsheet can be from a single cell, or multiple cells (sometimes maybe all the used cells in worksheet). View full C# code for modifying Cells in Excel spreadsheet. Get the second cell at the right of current cellĬellC5.CellRight(2).Value = "the second cell at right of C5 (E5)" ĬellC5.CellBelow(2).Value = "the second cell at below of C5 (C7)" Get left cell of current cell var cellLeft = cellC5.CellLeft() Get left/right/above/below cells of current cell. var cellC5 = worksheet.Cell(5, "C") Ĭ = ExcelColor.Red Get cell C5 by row id and column name, customize cell backgroud color. Get Cell by Row Id and Column Name in Worksheet Select cell B1 by row and column coordinate. var cellA1 = worksheet.Cell( "A1") Ĭ = ExcelColor.Red Select Cell A1 by cell name, modify the cell value, change cell font style. IDiTect.Excel provides cells manipulation in worksheet. How to Edit Spreadsheet Cell in C# language How to Manipulate Excel Cell and Range in C#.NET CodeĬell is the basic element in the Excel, ant the Range is a collection of cells.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |