2024年4月7日发(作者:)
else { dFont = currFont; break; }
}
return dFont;
}
private static ICellStyle FindStyle(this IWorkbook dWb, IWorkbook sWb, ICellStyle style, List
{
ICellStyle dStyle = null;
foreach (ICellStyle currStyle in dCellStyles)
{
if (ent != ent) continue;
else if (alAlignment != alAlignment) continue;
else if (Top != Top) continue;
else if (Bottom != Bottom) continue;
else if (Left != Left) continue;
else if (Right != Right) continue;
else if (derColor != derColor) continue;
else if (BorderColor != BorderColor) continue;
else if (rderColor != rderColor) continue;
else if (orderColor != orderColor) continue;
//else if (Diagonal != Diagonal) continue;
//else if (DiagonalColor != DiagonalColor) continue;
//else if (DiagonalLineStyle != DiagonalLineStyle) continue;
//else if (ckgroundColor != ckgroundColor) continue;
//else if (ckgroundColorColor != ckgroundColorColor) continue;
//else if (regroundColor != regroundColor) continue;
//else if (regroundColorColor != regroundColorColor) continue;
//else if (ttern != ttern) continue;
else if (ion != ion) continue;
else if (en != en) continue;
else if (ed != ed) continue;
else if (on != on) continue;
else if (ToFit != ToFit) continue;
else if (xt != xt) continue;
else if (!aFormatString().Equals(aFormatString())) continue;
else
{
IFont sFont = tAt(dex);
IFont dFont = nt(sFont, dFonts);
if (dFont == null) continue;
else
{
t(dFont);
dStyle = currStyle;
break;
}
}
}
return dStyle;
}
private static IFont CopyFont(this IFont dFont, IFont sFont, List
{
//t = t;
// = ;
ight = ight;
me = me;
= ;
ic = ic;
keout = keout;
ine = ine;
fset = fset;
(dFont);
return dFont;
}
private static ICellStyle CopyStyle(this ICellStyle dCellStyle, ICellStyle sCellStyle, IWorkbook dWb, IWorkbook sWb, List
{
ICellStyle currCellStyle = dCellStyle;
ent = ent;
alAlignment = alAlignment;
Top = Top;
Bottom = Bottom;
Left = Left;
Right = Right;
derColor = derColor;
rderColor = rderColor;
orderColor = orderColor;
BorderColor = BorderColor;
//Diagonal = Diagonal;
//DiagonalColor = DiagonalColor;
//DiagonalLineStyle = DiagonalLineStyle;
//ckgroundColor = ckgroundColor;
//regroundColor = regroundColor;
//ttern = ttern;
ion = ion;
en = en;
ed = ed;
on = on;
ToFit = ToFit;
xt = xt;
rmat = DataFormat().GetFormat(DataFormat().GetFormat(rmat));
IFont sFont = t(sWb);
IFont dFont = nt(sFont, dFonts) ?? Font().CopyFont(sFont, dFonts);
t(dFont);
(currCellStyle);
return currCellStyle;
}
private static void CopySheet(ISheet sSheet, ISheet dSheet)
{
var maxColumnNum = 0;
List
List
MergerRegion(sSheet, dSheet);
for (int i = owNum; i <= wNum; i++)
{
IRow sRow = (i);
IRow dRow = Row(i);
if (sRow != null)
{
CopyRow(sRow, dRow, dCellStyles, dFonts);
if (llNum > maxColumnNum)
maxColumnNum = llNum;
}
}
for (int i = 0; i <= maxColumnNum; i++)
umnWidth(i, umnWidth(i));
}
private static void CopyRow(IRow sRow, IRow dRow, List
{
= ;
ISheet sSheet = ;
ISheet dSheet = ;
for (int j = ellNum; j <= llNum; j++)
{
sCell = l(j);
dCell = l(j);
if (sCell != null)
{
if (dCell == null)
dCell = Cell(j);
CopyCell(sCell, dCell, dCellStyles, dFonts);
}
}
}
private static void CopyCell( sCell, dCell, List
{
ICellStyle currCellStyle = yle(ok, yle, dCellStyles, dFonts);
if (currCellStyle == null)
currCellStyle = CellStyle().CopyStyle(yle, ok, ok, dCellStyles, dFonts);
yle = currCellStyle;
switch (pe)
{
case :
lValue(CellValue);
break;
case c:
lValue(cCellValue);
break;
case :
lType();
break;
case n:
lValue(nCellValue);
break;
case :
lValue(ellValue);
break;
case a:
lFormula(rmula);
break;
default:
break;
}
}
private static void MergerRegion(ISheet sSheet, ISheet dSheet)
{
int sheetMergerCount = gedRegions;
for (int i = 0; i < sheetMergerCount; i++)


发布评论