|
@@ -235,8 +235,14 @@ def text_to_short_vedio_create(read_csv_use="導盲犬協會.csv",pwd_use="導
|
|
ck_anchor=None
|
|
ck_anchor=None
|
|
#時間
|
|
#時間
|
|
time_= 0
|
|
time_= 0
|
|
-
|
|
|
|
- csv_use=pd.read_csv("input/"+read_csv_use)
|
|
|
|
|
|
+ try:
|
|
|
|
+ if read_csv_use[-4:]==".csv":
|
|
|
|
+ csv_use=pd.read_csv("input/"+read_csv_use)
|
|
|
|
+ elif read_csv_use[-5:]==".xlsx":
|
|
|
|
+ csv_use = pd.read_excel("input/"+read_csv_use)
|
|
|
|
+ except:
|
|
|
|
+ print("excel不存在或excel格式不支援或損毀")
|
|
|
|
+ return
|
|
csv_use=csv_use.dropna(how='all')
|
|
csv_use=csv_use.dropna(how='all')
|
|
csv_use.reset_index(inplace=True)
|
|
csv_use.reset_index(inplace=True)
|
|
|
|
|