一个文件夹有一些excel文件,怎样用程序快速统计这些excel中每个文件的行数,我要的是总行数
解决方案 »
- delphi nt服务读取数据库
- 像这样的数据怎么读取啊?
- copyfile函数问题
- 如何在状态栏中加载背景图片 !!!!!!!!!!!!!!
- 请教:怎么能用编程的方式控制delphi开发的DCOM服务程序的安全属性?
- 静态数组的char 与 动态数组 的char 如何进行“互相”转换?
- 数据库中保存日期为整型,显示时要把整型转换为日期类型,如何处理?请赋上例程。谢谢
- 请问.dcu类型的文件是如何使用的?
- 关于delphi接口 自动生成骨架代码
- 大家看过来(学校机房管理),渴望大侠们的高见!
- 请问在DBgrideh中怎样实现如图所示的功能?
- delphi 多个数据源怎样显示数据在同一DBGrid里
var
sch:TSearchrec;
begin
Result:=TStringlist.Create;
if rightStr(trim(Path), 1) <> '\' then
Path := trim(Path) + '\'
else
Path := trim(Path);
if not DirectoryExists(Path) then
begin
Result.Clear;
exit;
end;
if FindFirst(Path + '*', faAnyfile, sch) = 0 then
begin
repeat
Application.ProcessMessages;
if ((sch.Name = '.') or (sch.Name = '..')) then Continue;
if DirectoryExists(Path+sch.Name) then
begin
Result.AddStrings(MakeFileList(Path+sch.Name,FileExt));
end
else
begin
if (UpperCase(extractfileext(Path+sch.Name)) = UpperCase(FileExt)) or (FileExt='.*') then
Result.Add(Path+sch.Name);
end;
until FindNext(sch) <> 0;
SysUtils.FindClose(sch);
end;
end
xlsapp.displayalerts:=false;
xlsapp.screenupdating:=false;
xlsapp.workbooks.add('c:\the.xls');
workbook:=xlsapp.workbooks[1];
sheet:=workbook.worksheets[1];XLsApp.ActiveCell.SpecialCells(xlLastCell).Select;
maxRows:=XLsApp.ActiveCell.row; //最大行数
maxcolumns:=xlsapp.activecell.column;//最大列数要是分页的 话还需要处理下。