Skip to content

Commit 05d8331

Browse files
Takashi InoueTakashi Inoue
Takashi Inoue
authored and
Takashi Inoue
committed
Update AggregateExcel.py
ライブラリのインポート漏れを修正
1 parent 3d8053b commit 05d8331

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

AggregateExcel.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import glob
2424
import xlrd # ExcelRead (xls,xlsx)
2525
import shutil
26+
import sys
2627

2728

2829
#---------------------------------------------------------------------
@@ -32,13 +33,13 @@
3233
# フォルダの存在確認 (トップフォルダ)
3334
topFolderPath = os.path.abspath(topFolderPath)
3435
if(os.path.exists(topFolderPath) == False):
35-
ErrorEnd ('Error | 指定されたフォルダ(トップフォルダ)が存在しません: ' + topFolderPath)
36+
print ('Error | 指定されたフォルダ(トップフォルダ)が存在しません: ' + topFolderPath)
3637
sys.exit()
3738

3839
# フォルダの存在確認 (入力ファイル格納フォルダ)
3940
inputFolderPath = os.path.abspath(inputFolderPath)
4041
if(os.path.exists(inputFolderPath) == False):
41-
ErrorEnd ('Error | 指定されたフォルダ(入力データ格納フォルダ)が存在しません: ' + inputFolderPath)
42+
print ('Error | 指定されたフォルダ(入力データ格納フォルダ)が存在しません: ' + inputFolderPath)
4243
sys.exit()
4344

4445
# フォルダの存在確認 (出力ファイル格納フォルダが存在していたら削除してから新規作成、存在していなければ新規作成)
@@ -50,7 +51,7 @@
5051
# 入力ファイル格納フォルダ内のXLSファイルのパス一覧を取得する
5152
xlsFilePaths = glob.glob(inputFolderPath + '/*.xls')
5253
if(len(xlsFilePaths) == 0):
53-
ErrorEnd ('Error | 入力ファイル格納フォルダにXLSファイルが格納されていません: ' + inputFolderPath)
54+
print ('Error | 入力ファイル格納フォルダにXLSファイルが格納されていません: ' + inputFolderPath)
5455
sys.exit()
5556

5657
# パス一覧をもとに、1つずつXLSファイルを当たってゆく

0 commit comments

Comments
 (0)