I fixed it now. And those " " are important because of file paths like "C:/Users/New Folder/...". Observe the space please. I copied this code from StackOverflow
class UserInfoWidget(BoxLayout): def browse_file(self): co_initialize = ctypes.windll.ole32.CoInitialize co_initialize(None) import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import OpenFileDialog file_dialog = OpenFileDialog() print(dir(file_dialog)) file_dialog.Filter = "Excel files|*.xls;*.xlsx" ret = file_dialog.ShowDialog() # if ret != 1: # print("Cancelled") # sys.exit()