Range range = osheet.Range(osheet.Cells, osheet.Cells) Just to correct something, this line is wrong: #Where is merge and center in excel .dll#One more thing we need to do is add a reference to .dll and import the same DLL to be able to use the Excel Interop API. So there you have it, we can put these 3 steps into a method and use it whenever we want to merge and center cells. Range.HorizontalAlignment = .XlHAlign.xlHAlignCenter This can be done again with a single statement as shown below
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |