release 1.02 调整sheetview使用方式

This commit is contained in:
csh 2022-12-23 11:10:24 +08:00
parent 318d4ba97e
commit ca6d7b3324
3 changed files with 5 additions and 11 deletions

Binary file not shown.

View File

@ -617,7 +617,6 @@ Type TSExcelFile = Class
///sheet: string工作表名称
///hcell: string左上角坐标
///vcell: string右下角坐标
///返回: [err, info]
Function UnMergeCell(sheet, hcell, vcell);
Begin
return workbook_.UnMergeCell(sheet, hcell, vcell);
@ -627,23 +626,20 @@ Type TSExcelFile = Class
///sheet: string工作表名称
///viewIndex: int视图索引
///sheet: objectTSheetView对象
///返回: [err, TSheetView]
Function SetSheetViewOptions(sheet, viewIndex, sheetView);
Begin
o := getOj(sheet, 'xlsxSheetView');
if not ifObj(o) then return array(1, 'The sheet is not exist');
return o.SetSheetViewOptions(viewIndex, sheetView);
if ifObj(o) then return o.SetSheetViewOptions(viewIndex, sheetView);
End;
///获取工作表视图属性
///sheet: string工作表名称
///viewindex: int视图索引viewIndex 可以是负数,如果是这样,则向后计数(-1 代表最后一个视图)
///返回: [err, TSheetView]
///返回: object, TSheetView对象
Function GetSheetViewOptions(sheet, viewIndex);
Begin
o := getOj(sheet, 'xlsxSheetView');
if not ifObj(o) then return array(0, 'The sheet is not exist');
return o.GetSheetViewOptions(viewIndex);
if ifObj(o) then return o.GetSheetViewOptions(viewIndex);
End;
// TODO printerSettings1.bin?

View File

@ -17,11 +17,10 @@ Type xlsxSheetView = Class
Begin
marshal := SheetView.Marshal();
class(xlsxXml).UpdateNode(sheet_view_node, marshal['attributes'], array());
return array(0, '');
return '';
End
sheet_view_node := sheet_view_node.NextElement();
End
return array(1, 'viewIndex not found : ' $ viewIndex);
End;
Function GetSheetViewOptions(viewIndex, sheetView);
@ -39,10 +38,9 @@ Type xlsxSheetView = Class
sheetview.ShowRowColHeaders := marshal['attributes']['showRowColHeaders'];
sheetview.ZoomScale := marshal['attributes']['zoomScale'];
sheetview.ZoomScaleNormal := marshal['attributes']['zoomScaleNormal'];
return array(0, sheetView);
return sheetview;
End
End
return array(1, 'viewIndex not found : ' $ viewIndex);
End
class Function NewObject(sheetname, file);