native excel 文件已经打开的判断
book := TXLSWorkbook.Create; try if book.Open(AFIleName) = -1 then begin raise Exception.Create('请检查导入的文件是否存在或Excel已经处于打开状态(如果已经打开,请尝试关闭文件再导入)'); end; ws := book.WorkSheets[1]; if ws.UsedRange.Rows.Count = 0 then begin Exit; end;