用Formula one 如何打印、写数据?
请问,使用Formula one如何打印、写数据! 问题点数:20、回复次数:5Top
1 楼FlyingQQ(FlyingQQ)回复于 2002-04-04 11:22:34 得分 0
CSDN上没人用Formula one做表格吗?
怎么我问的所有关于Formula one的问题都没有人回答!Top
2 楼vigrous_chen(风)回复于 2002-04-04 12:18:31 得分 10
至少有两种方法来完成你的要求!
1、直接写到各个cell中
2、通过odbc的方式连接。
下面为你一段把ADOQuery1中的内容到如F1Book中
其中StrArr2d:Array of Array of string;
//将ADOQuery倒到F1中
procedure PutDataToF1(AQ:TADOQuery;F1:TF1Book;Title:string='');
var
DataCells:StrArr2d;
i,ii:integer;
begin
if not AQ.Active then Exit;
Inv_DM.LoadAQData(AQ,DataCells);
f1.MaxCol :=High(DataCells[0])+1;
F1.MaxRow :=High(DataCells)+1;
if Length(DataCells)<=0 then Exit;
if Length(DataCells[0])<=0 then Exit;
for i:=Low(DataCells)+1 to High(DataCells) do
for ii:=Low(DataCells[i]) to High(DataCells[i])do
F1.TextRC[i+1,ii+1]:=DataCells[i][ii];
F1.SetColWidthAuto(Low(DataCells)+1,Low(DataCells[0])+1,
High(DataCells)+1,High(DataCells[0])+1,False);
if High(DataCells)>=0 then
for i:=Low(DataCells[0])to High(dataCells[0]) do
begin
F1.ColText[i+1]:=DataCells[0][i];
F1.TextRC[1,i+1]:=DataCells[0][i];
end;
// f1.MaxCol :=High(DataCells[0])+1;
// F1.MaxRow :=High(DataCells);
AllignCenter(f1);
f1.Title :=Title;
f1.SheetName[1]:=Title;
begin
end;
end;Top
3 楼vigrous_chen(风)回复于 2002-04-04 12:20:43 得分 8
对于打印F1Book有属性的,看看一下他的帮助吧
好象是F1Book1.FilePrint(true);Top
4 楼tanqth(青蛙)回复于 2002-04-04 12:37:28 得分 1
同意楼上的Top
5 楼chen_yj(今天)回复于 2002-04-04 14:28:04 得分 1
关注此类问题Top




