码迷,mamicode.com
首页 > Web开发 > 详细

vb.net 改变 excel 底色

时间:2019-10-23 11:58:18      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:with   lap   and   mil   dex   new   microsoft   range   end   

Dim excelApplication AsNew Excel.Application

Dim excelWorkBook As Excel.Workbook = excelApplication.Workbooks.Add()

Dim excelWorkSheet As Excel.Worksheet = excelWorkBook.Worksheets.Add

 

 

 

Dim cellStart = excelWorkSheet.Cells(2, 3)

Dim cellEnd = excelWorkSheet.Cells(10, 20)

 

With excelWorkSheet.Range(cellStart, cellEnd).Interior           

‘.Pattern = Microsoft.Office.Interop.Excel.Constants.xlSolid

‘.PatternColorIndex = Microsoft.Office.Interop.Excel.Constants.xlAutomatic

            .Color =Color.Yellow

‘.TintAndShade = 0

‘.PatternTintAndShade = 0

EndWith

vb.net 改变 excel 底色

标签:with   lap   and   mil   dex   new   microsoft   range   end   

原文地址:https://www.cnblogs.com/gaoleionline/p/11725029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!