Perl4.操作行/列
示例
#Insert a row before/after line 22
$Sheet->Rows("22:22")->Insert(xlUp, xlFormatFromRightOrBelow);
$Sheet->Rows("23:23")->Insert(-4121,0); #xlDown is -4121 and that xlFormatFromLeftOrAbove is 0
#Delete a row
$Sheet->Rows("22:22")->Delete();
#Set column width and row height
$Sheet -> Range('A:A') -> {ColumnWidth} = 9.14;
$Sheet -> Range("8:8") -> {RowHeight} = 30;
$Sheet -> Range("G:H") -> {Columns} -> Autofit;
# Get the last row/column
my $last_row = $Sheet -> UsedRange -> Find({What => "*", SearchDirection => xlPrevious, SearchOrder => xlByRows}) -> {Row};
my $last_col = $Sheet -> UsedRange -> Find({What => "*", SearchDirection => xlPrevious, SearchOrder => xlByColumns}) -> {Column};
#Add borders (method 1)
$Sheet -> Range("A3:H3") -> Borders(xlEdgeBottom) -> {LineStyle} = xlDouble;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeBottom) -> {Weight} = xlThick;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeBottom) -> {ColorIndex} = 1;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeLeft) -> {LineStyle} = xlContinuous;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeLeft) -> {Weight} = xlThin;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeTop) -> {LineStyle} = xlContinuous;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeTop) -> {Weight} = xlThin;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeBottom) -> {LineStyle} = xlContinuous;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeBottom) -> {Weight} = xlThin;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeRight) -> {LineStyle} = xlContinuous;
$Sheet -> Range("A3:H3") -> Borders(xlEdgeRight) -> {Weight} = xlThin;
$Sheet -> Range("A3:H3") -> Borders(xlInsideVertical) -> {LineStyle} = xlDashDot
$Sheet -> Range("A3:H3") -> Borders(xlInsideVertical) -> {Weight} = xlMedium;
$Sheet -> Range("A3:I3") -> Borders(xlInsideHorizontal) -> {LineStyle} = xlContinuous;
$Sheet -> Range("A3:I3") -> Borders(xlInsideHorizontal) -> {Weight} = xlThin;
#Add borders (method 2)
my @edges = qw (xlInsideHorizontal xlInsideVertical xlEdgeBottom xlEdgeTop xlEdgeRight);
foreach my $edge (@edges)
热门推荐
1 如何训练狗狗不叫
2 训练狗狗不叫
3 训练狗狗随行
4 怎么训练狗狗不叫
7 训练比熊狗狗教程
10 上海狗狗训练
11 怎么训练狗狗上厕所
12 训练狗狗趴下
13 狗狗服从训练
14 训练狗狗拒食
15 训练狗狗笑
16 训练狗狗大便
17 训练狗狗立
18 训练狗狗捡东西