关于f1book如何打开和保存文件-------新手提问(50分)

  • 主题发起人 主题发起人 mao-jin
  • 开始时间 开始时间
M

mao-jin

Unregistered / Unconfirmed
GUEST, unregistred user!
请朋友给我列一下f1book6.1打开和保存文件的语法,最好详细点,不胜感激.我怎么一运行编译器就提示参数错误.
 
话题2122097的标题是: 请问F1Book控件的如何打开一个己存在的 .VTS类型的文件 (50分)
分类:ActiveX 控件 ptfjy (2003-08-20 14:00:00)
如题
关于F1Book的具体使用能否发一个Demo给我呢?
谢谢!我的E-mail:fhptfjy@mail.nbptt.zj.cn

masoft (2003-08-20 14:22:00)
兄弟。这么简单的问题都没人回答。
结结以前的贴吧。

ptfjy (2003-08-20 20:11:00)
看来没人能帮了, 只能靠自己!!!

masoft (2003-08-20 20:29:00)
是你的名声不好。老是不发分!

cc112233 (2003-08-20 20:36:00)
调用Function F1BOOK1.Read(),这个FUNCTION功能很功的,有两个参数 ,一个是文件名,另一是文件类型,如EXCEL,TEXT ,FORMULAONE等等。

ptfjy (2003-08-21 18:20:00)
to masoft:
老兄, 像你这样就能得分, 可能性不大矣!!!

fu_qi_ming (2003-08-21 18:47:00)
var b:integer;
FileName:='c:/Demo.vts';
F1Book1.Read(FileName,b);

ptfjy (2003-08-21 20:11:00)
To:fu_qi_ming
请问1、如何保存呢?
2、如何插入一行?
我在保存的时候, 如果输入字符后,光标没有移动, 这样刚才输入的字符没有保存,
如何解决呢?

masoft (2003-08-22 8:28:00)
哈哈。

ptfjy (2003-08-22 13:53:00)
to masoft:
算了吧, 又没什么水平!

fu_qi_ming (2003-08-22 18:43:00)
请问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 shifteddo
wn to make room for the inserted cells.
F1ShiftRows 3 Rows in which the specified range resides are shifteddo
wn 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 begin
ning 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.

masoft (2003-08-23 9:00:00)
帮你顶

ptfjy (2003-08-25 20:10:00)
接受答案了.

fu_qi_ming的回答最终被接受。
 
接受答案了.
 
后退
顶部