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

View File

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