delphi 导出excel边框样式

delphi 样式常量值 
xlNone = $FFFFEFD2;
xlAutomatic = $FFFFEFF7;
xlSolid = $00000001;
xlInsideHorizontal = $0000000C;
xlInsideVertical = $0000000B;
xlDiagonalDown = $00000005;
xlDiagonalUp = $00000006;
xlEdgeBottom = $00000009;
xlEdgeLeft = $00000007;
xlEdgeRight = $0000000A;
xlEdgeTop = $00000008;
xlContinuous = $00000001;
xlDash = $FFFFEFED;
xlDashDot = $00000004;
xlDashDotDot = $00000005;
xlDot = $FFFFEFEA;
xlDouble = $FFFFEFE9;
xlSlantDashDot = $0000000D;
xlLineStyleNone = $FFFFEFD2;
xlHairline = $00000001;
xlMedium = $FFFFEFD6;
xlThick = $00000004;
xlThin = $00000002;
xlCenter = $FFFFEFF4;
xlBottom = $FFFFEFF5;
xlLeft = $FFFFEFDD;
xlRight = $FFFFEFC8;
xlTop = $FFFFEFC0; 

有时候设置边框特殊样式就会用到上面这些值 如  
Excelid.worksheets[1].range['A1','M1'].borders[1].linestyle:=1;
Excelid.worksheets[1].range['A1','M1'].borders[2].linestyle:=1;
Excelid.worksheets[1].range['A1','M1'].borders[3].linestyle:=1;
Excelid.worksheets[1].range['A1','M1'].borders[3].Weight:=  $FFFFEFD6; ;
Excelid.worksheets[1].range['A1','M1'].borders[4].linestyle:=1;

//borders常数 1-左    2-右   3-顶    4-底   5-斜( \ )  6-斜( / )
//Weight 边框格式,具体可以通过excel 宏录制查看具体样式值

Q群 Delphi Home 235236282,QQ:359985051/183902633 

诚邀delphi 爱好者加入,一起学习,研究、探讨。

你可能感兴趣的:(delphi,delphi,excel,边框,样式,宏)