VBA
Public Function FileExists(strFileName As String) As Boolean FileExists = Len(Dir(strFileName)) > 0 End Function
C#
{ string strFileName = @"c:\temp\mySpreadsheet.xlsx"; Console.WriteLine(File.Exists(strFileName) ? "File exists" : "File does not exist"); }
No comments:
Post a Comment