导出到Excel遇到的问题
怎么合并单元格阿
Dim range As Range = DirectCast(worksheet.Cells._Default(row, col), Range)
range.Select()
range.Value2 = Value.ToString
range.Style = StyleName
range.Columns.EntireColumn.AutoFit()
range.Borders.Weight = DirectCast(2, XlBorderWeight)
range.Borders.LineStyle = DirectCast(1, XlLineStyle)
range.Borders.ColorIndex = DirectCast(-4105, XlColorIndex)
------解决方案--------------------range.Merge(Type.Missing);