File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 23
23
import glob
24
24
import xlrd # ExcelRead (xls,xlsx)
25
25
import shutil
26
+ import sys
26
27
27
28
28
29
#---------------------------------------------------------------------
32
33
# フォルダの存在確認 (トップフォルダ)
33
34
topFolderPath = os .path .abspath (topFolderPath )
34
35
if (os .path .exists (topFolderPath ) == False ):
35
- ErrorEnd ('Error | 指定されたフォルダ(トップフォルダ)が存在しません: ' + topFolderPath )
36
+ print ('Error | 指定されたフォルダ(トップフォルダ)が存在しません: ' + topFolderPath )
36
37
sys .exit ()
37
38
38
39
# フォルダの存在確認 (入力ファイル格納フォルダ)
39
40
inputFolderPath = os .path .abspath (inputFolderPath )
40
41
if (os .path .exists (inputFolderPath ) == False ):
41
- ErrorEnd ('Error | 指定されたフォルダ(入力データ格納フォルダ)が存在しません: ' + inputFolderPath )
42
+ print ('Error | 指定されたフォルダ(入力データ格納フォルダ)が存在しません: ' + inputFolderPath )
42
43
sys .exit ()
43
44
44
45
# フォルダの存在確認 (出力ファイル格納フォルダが存在していたら削除してから新規作成、存在していなければ新規作成)
50
51
# 入力ファイル格納フォルダ内のXLSファイルのパス一覧を取得する
51
52
xlsFilePaths = glob .glob (inputFolderPath + '/*.xls' )
52
53
if (len (xlsFilePaths ) == 0 ):
53
- ErrorEnd ('Error | 入力ファイル格納フォルダにXLSファイルが格納されていません: ' + inputFolderPath )
54
+ print ('Error | 入力ファイル格納フォルダにXLSファイルが格納されていません: ' + inputFolderPath )
54
55
sys .exit ()
55
56
56
57
# パス一覧をもとに、1つずつXLSファイルを当たってゆく
You can’t perform that action at this time.
0 commit comments