![]() ![]() This method removes an active hyperlink from a cell, but leaves its descriptive text formatted as a hyperlink. To remove any hyperlinks contained in a cell or cell range, call the Worksheet.ClearHyperlinks method. To remove cell formatting only, call the Worksheet.ClearFormats method, or apply the Normal style to cells via the CellRange.Style property. ![]() To remove cell content only ( value and formula), call the Worksheet.ClearContents method, or assign the CellRange.Value property to null or to CellValue.Empty. To remove all cell information (content, formatting, hyperlinks and comments), call the Worksheet.Clear method. This example demonstrates how to clear worksheet cells. To delete entire cells from the worksheet, use the Worksheet.DeleteCells method (see the How to: Delete a Cell or Range of Cells example). These extension methods are accessible as methods of the CellRange object and called by using the instance method syntax. To clear cells, you can also use the range’s Clear* extension methods, defined by the RangeExtensions class ( RangeExtensions.Clear, RangeExtensions.ClearContents, RangeExtensions.ClearFormats, RangeExtensions.ClearHyperlinks and RangeExtensions.ClearComments). You can separately remove cell content, formatting, hyperlinks or comments using the Worksheet.ClearContents, Worksheet.ClearFormats, Worksheet.ClearHyperlinks or Worksheet.ClearComments methods, respectively. The Clear method empties cells and clears all formatting. A CellRange object specifying the cell range to clear. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |