SVN r1219
SVN-Revision: r1219
This commit is contained in:
@@ -4256,8 +4256,9 @@ namespace Lskj.Control.Model
|
||||
// 优先复制整个工作表,最大程度保留字体、边框、筛选、列宽等导出格式。
|
||||
targetPackage.Workbook.Worksheets.Add(sheetName, sourceSheet);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
// 整表复制失败时,退回到逐格复制,仍然尽量保留单元格样式。
|
||||
if (targetPackage.Workbook.Worksheets[sheetName] != null)
|
||||
{
|
||||
@@ -4399,7 +4400,11 @@ namespace Lskj.Control.Model
|
||||
if (sourceSheet.View != null)
|
||||
{
|
||||
targetSheet.View.ShowGridLines = sourceSheet.View.ShowGridLines;
|
||||
targetSheet.View.ZoomScale = sourceSheet.View.ZoomScale;
|
||||
int zoomScale = sourceSheet.View.ZoomScale;
|
||||
if (zoomScale >= 10 && zoomScale <= 400)
|
||||
{
|
||||
targetSheet.View.ZoomScale = zoomScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user