各位大佬們請幫幫新手小白~我想了好久了 先謝謝大家了
請問python主程序運行到觸發副程式(open_file)後,要怎?把副程式變數值提輸出到主程
序
def open_file():
filename = tf.askopenfilename()
if filename != '':
app=xw.App(visible=False)
wb=xw.Book(filename)
sht=wb.sheets[0]
ros=sht.used_range.rows.count
cos=sht.used_range.columns.count
print(ros)
wb.close()
app.quit()
else:
tkinter.messagebox.showerror(title='error', message='no select')