質問編集履歴
3
プログラムの訂正を行いました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,24 +6,19 @@
|
|
6
6
|
import os
|
7
7
|
import tkinter
|
8
8
|
|
9
|
-
|
10
9
|
from tkinter import messagebox
|
11
10
|
from tkinter import filedialog
|
12
|
-
|
11
|
+
|
13
12
|
root = tkinter.Tk()
|
14
13
|
root.title('DATA FITTING')
|
15
14
|
root.geometry('500x250')
|
16
|
-
|
17
15
|
|
18
16
|
def select_click():
|
19
|
-
|
17
|
+
messagebox.showinfo('select','FFITING DATAのExcelファイルを選択してください')
|
20
|
-
|
18
|
+
fileType = [('Excelファイル','*.xlsx')] #ファイルタイプをExcelファイルに指定
|
21
|
-
|
19
|
+
iniDir = os.path.abspath(os.path.dirname(__file__)) #初期表示フォルダ
|
22
|
-
|
20
|
+
filepath = filedialog.askopenfilename(filetypes=fileType,initialdir = iniDir)
|
23
|
-
|
21
|
+
messagebox.showinfo('選択したファイル',filepath)
|
24
|
-
|
25
22
|
|
26
23
|
selectButton = tkinter.Button(root, text='File Select',command=select_click)
|
27
|
-
selectButton.pack()
|
24
|
+
selectButton.pack()
|
28
|
-
|
29
|
-
root.mainloop()
|
2
コードの修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
TKinterの追加、fileの修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|