我正在尝试检查某行是否包含NIL或NIL,但代码返回此错误。
输入字符串的格式不正确
我做错了什么?
If drExcel("NSN") IsNot "" Or "NIL" Then
答案 0 :(得分:1)
不应该直接检查或条件。你可以这样做
NSError * error;
NSArray *paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
NSURL *urlDestination = [paths lastObject];
urlDestination = [urlDestination URLByAppendingPathComponent:[url lastPathComponent]];
if([[NSFileManager defaultManager] fileExistsAtPath:[urlDestination relativePath]]){
[[NSFileManager defaultManager] removeItemAtPath:[urlDestination relativePath] error:nil];
}