Free Support Forum -

Merging Cells

I was going through the programmers guide for merging cells and I came across the following line of code:

Dim style As Style = worksheet.Cells(5, 2).Style

Is this code/syntax obsolete?


Yes, the Cell.Style attribute is deprecated and will be excluded completely from the next year or so. You should use Cell.GetStyle() and Cell.SetStyle() methods instead as these methods would give you extra performance.

See some documents for reference:

And, we will soon update the code segments in the document:

Thank you.