请问1、如何保存呢?
var
a:widestring;
b:smallint;
begin
try
b:=11;
self.F1Book1.SaveFileDlg('报表文件另存对话窗',a,b);
self.F1Book1.Write(a,b);
except end;
b:文件类型
F1FileType provides options for specifying a file type for reading or writing a worksheet.
The following table lists the valid constants for F1FileType:
Constants Value Description
F1FileExcel5 4 Excel 5 and 7/95
F1FileExcel97 11 Excel 97/Excel 8
F1FileFormulaOne3 5 Formula One 3.x, 4.x and 5.x
F1FileFormulaOne6 12 Formula One 6
F1FileHTML 9 HTML (write only)
F1FileHTMLDataOnly 10 HTML Data (write only)
F1FileTabbedText 3 Tabbed text
F1FileTabbedTextValuesOnly 6 Tabbed text (values only)
Copyright ?1998, Tidestone Technologies, Inc.
2、如何插入一行?
Syntax
F1Book1.InsertRange nR1, nC1, nR2, nC2, InsertType
Part Type Description
nR1, nC1,
nR2, nC2 Long Coordinates that specify the range that identifies how many cells, rows, or columns are inserted and where they are inserted. nR1 indicates the range starting row . nR2 indicates the range ending row . If nR1 and nR2 are not equal, you insert more than one row. If nR1 is -1, all rows are included as the range of insertion. nC1 indicates the range starting column. nC2 indicates the range ending column. If nC1 and nC2 are not equal, you insert more than one column. If nC1 is -1, all columns are included as the range of insertion.
InsertType F1ShiftTypeConstants The following F1ShiftTypeConstants determine how the insert should occur.
Constant Value Description
F1ShiftHorizontal 1 Cells of the specified range are shifted right to make room for the inserted cells.
F1ShiftVertical 2 Cells of the specified range are shifted down to make room for the inserted cells.
F1ShiftRows 3 Rows in which the specified range resides are shifted down to make room for the inserted cells.
F1ShiftCols 4 Columns in which the specified range resides are shifted right to make room for the inserted cells.
The following members determine whether the inserted range should be included in the formula and precisely how the range should be included.
Constant Value Description
F1FixupNormal 0 Formula is not modified to include the new range.
F1FixupPrepend 16 Formula is modified to add inserted range to beginning of formula range reference.
F1FixupAppend 32 Formula is modified to add inserted range to end of formula range reference.
Copyright ?1998, Tidestone Technologies, Inc.
我在保存的时候, 如果输入字符后,光标没有移动, 这样刚才输入的字符没有保存,
如何解决呢?
你可以重新选择另一cell即可.setselection
Syntax
F1Book1.SetSelection nRow1, nCol1, nRow2, nCol2
Part Type Description
nRow1, nCol1, nRow2, nCol2 Long Identifies the row and column coordinates you want to select.
Copyright ?1998, Tidestone Technologies, Inc.