c# 使用Microsoft.Office.Interop.Excel保存的Excel表格如何设置数据居中显示?

2024-12-19 11:15:34
推荐回答(1个)
回答1:

//水平剧中设置
excelRangeParm.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
//垂直剧中设置
excelRangeParm.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter;
excelRangeParm是你选择的Range