IOError: [Errno 2] No such file or directory: 'D:\\Users\\daimao\\Desktop\\1.xls'
出现这种情况,首先查看目录是否有错,该目录文件是否存在。
其次在Python中“\”会被自动认为是转义字符,而非目录分隔符,此时修改为'D:\\Users\\daimao\\Desktop\\1.xls'即可。
IOError: [Errno 2] No such file or directory: 'D:\\Users\\daimao\\Desktop\\1.xls'
出现这种情况,首先查看目录是否有错,该目录文件是否存在。
其次在Python中“\”会被自动认为是转义字符,而非目录分隔符,此时修改为'D:\\Users\\daimao\\Desktop\\1.xls'即可。