Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
fly1342
Posted - 08/29/2022 : 04:42:27 AM When I click the Text Button 'Open File' I want a File Browser to Pop up so that the user can double click the excel file that they want.
Then when they push ok I want this excel file to be opened as a worksheet.
I have succeded in making the Text Button and running some codes by clicking on the button.
And I know how to open a worksheet by 'hard-coding' the excel file location like below.
But I can't find how to open a file browser by clicking the button and how it can be uploaded as a new worksheet right away without any other user actions.
Can someone help please? ^^;
john
1 L A T E S T R E P L I E S (Newest First)
YimingChen
Posted - 08/29/2022 : 08:49:19 AM Can you try:
import originpro as op
file = op.file_dialog('*.xlsx')
if file:
print(file)