3个回答
展开全部
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).
Interior.
Color
= System.Drawing.ColorTranslator.ToOle(Color.FromArgb(204, 255, 204));
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Font.
Size =
9;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeRight).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeBottom).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeTop).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
其实1和i+1代表着Excel的单元格位置
myExcel是
Microsoft.Office.Interop.Excel.ApplicationClass myExcel = new Microsoft.Office.Interop.Excel.ApplicationClass();
Interior.
Color
= System.Drawing.ColorTranslator.ToOle(Color.FromArgb(204, 255, 204));
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Font.
Size =
9;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeRight).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeBottom).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
((Microsoft.Office.Interop.Excel.Range)myExcel.Cells[1, i + 1]).Borders
.
get_Item(XlBordersIndex.xlEdgeTop).LineStyle =
Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
其实1和i+1代表着Excel的单元格位置
myExcel是
Microsoft.Office.Interop.Excel.ApplicationClass myExcel = new Microsoft.Office.Interop.Excel.ApplicationClass();
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以启动 宏,然后操作Excel,之后关闭宏,查看宏
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询