diff --git a/ExcelFile使用帮助.xlsx b/ExcelFile使用帮助.xlsx index a4acb61..867fe9c 100644 Binary files a/ExcelFile使用帮助.xlsx and b/ExcelFile使用帮助.xlsx differ diff --git a/funcext/TSOffice/TSExcelFile.tsf b/funcext/TSOffice/TSExcelFile.tsf index 5639cbd..cbfd3e3 100644 --- a/funcext/TSOffice/TSExcelFile.tsf +++ b/funcext/TSOffice/TSExcelFile.tsf @@ -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: object,TSheetView对象 - ///返回: [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? diff --git a/funcext/TSOffice/worksheet/xlsxSheetView.tsf b/funcext/TSOffice/worksheet/xlsxSheetView.tsf index 1b74f6b..6cd17e8 100644 --- a/funcext/TSOffice/worksheet/xlsxSheetView.tsf +++ b/funcext/TSOffice/worksheet/xlsxSheetView.tsf @@ -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);