Excel and aspnet

xiaoxiao2021-03-06  50

Range.interior.colorindex = 15;

Range.font.bold = true;

Range.Bordraound (Excel.xllinestyle.xlcontinuous, Excel.xlborderweight.xlt.xlthin, Excel.xlcolorIndex.xlcolorindexautomatic, null);

Range.Borders [Excel.xlbordersindex.xlinsidehorizontal] .COLORINDEX = Excel.xlcolorIndex.xlcolorIndexautomatic

Range.Borders [Excel.xlbordersindex.xlinsidehorizontal] .LINESTYLE = Excel.xllinestyle.xlcontinuous;

Range.Borders [Excel.xlbordersindex.xlinsidehorizontal] .Weight = Excel.xlborderweight.xlt.xlthin;

Range.Borders.weight = "xlthin";

Range.Borders.LineStyle = 1;

Newbook.worksheets (1) .range ("A1: B1000"). Numberformat = "0"

Newbook.worksheets (1) .range ("A1: B1000"). Horizontalalignment = 1 'left alignment

Newbook.worksheets (1) .range ("A1: D1"). Merge ()

Newbook.worksheets (1) .Range ("A1: D1"). value = "TEST" 'merge unit

Newbook.worksheets (1). Range ("A1: D1"). Horizontalalignment = 3 'Central alignment

Newbook.worksheets (1) .columns ("a"). ColumnWidth = 50 'Settings column width

Newbook.worksheets (1 ).ROWS (2) .rtowheight = 40 'Sets line high

Newbook.worksheets (1) .columns ("a"). WrapText = true

Newbook.worksheets (1) .Columns ("b"). ColumnWidth = 50

Newbook.worksheets (1) .columns ("b"). WrapText = true

Newbook.worksheets (1) .Cells (2, 1). Interior.ColorIndex = "15" 'Settings the color

Newbook.worksheets (1) .cells (2, 1). Borders.LineStyle = 1 'Set Border 1 is the solid line, 2 is a broken line

Newbook.worksheets (1) .cells (3, 2) .font.name = "verdana"

Newbook.worksheets (1) .cells (3, 2) .font.italic = TRUE

Newbook.worksheets (1) .cells (3, 2). Horizontalalignment = 4 'right alignment

Newbook.worksheets (1) .cells (3, 2) .font.color = RGB (0,0,0)

转载请注明原文地址:https://www.9cbs.com/read-83007.html

New Post(0)