QFileDialog::getOpenFileName is a static function provided by Qt to show a dialog for opening a file. If a file is selected, this function return the path of the file.
Questions tagged [getopenfilename]
96 questions
0
votes
2 answers
How to calculate formula with data in file opened with GetOpenFilename?
I wrote code to reformat a workbook by separating and combining information on separate sheets and then save every sheet separately as a CSV.
The beginning of my code:
Sub All()
Dim Bottom As Long
Dim Header As Long
> 'A. CHECK DATE
If…

Rick
- 15
- 3
0
votes
1 answer
Windows API OPENFILENAME extension filter problem
I have this openfile() function with OPENFILENAME structure, the lpstrFilter does not filter
file types at all, the Dialog Box shows all types of files which I want to prevent, it should normally show only selected file types according to the…

nabi
- 1
- 1
0
votes
1 answer
Crash in Win32 App while calling "GetOpenFileName"
I have one win32 prog where i want to call GetOpenFileName() but every time it got crash and CommDlgExtendedError() return error code as 1008. Please help me out.
char Filestring[MAX_PATH] = "\0";
OPENFILENAME ofn = { 0 };
ofn.lStructSize =…

prod
- 1
0
votes
0 answers
C++ OPENFILENAME Dialog
I have a question about the GetOpenFileName() dialog. What is the flag that I should use to prevent the user from typing a non-existing file and open it? I would like to see a warning message stating that the file does not exist.
According to…

nabi
- 1
- 1
0
votes
1 answer
Making myfgets using char pointer as an input
char *myfgets(char *s, int n, FILE *in) {
char ch;
if (n<=0) {
return s;
}
while (((ch = getc(in)) != '\n')) {
if(ch == EOF){
return NULL;
}
else if (ch == '\n') {
break;
…

Suki Sebastian
- 3
- 5
0
votes
1 answer
I am trying to get file to open while also compiling on same line so getting ./a.out but my file isnt opening
i was able to get the code to allow me to enter ./a.out then a file name
but when i enter a valid file name it keeps outputting
"Error: invalid filename"
not sure how to fix this
this is what I've done so far
#include
#include…
user18453148
0
votes
0 answers
VBA Debug showing error in the highlighted line. I need a selection i.e. range to be dynamic
Error is "script out of range". I want range selection to be relative i.e dynamic.
Sub input_file()
Dim FileToOpen As Variant
Dim Openbook As Workbook
Application.ScreenUpdating = False
FileToOpen =…

what's_in_the_name
- 11
- 2
0
votes
1 answer
Open a file from pc into tkinter
It is possible to open a file in tkinter from pc using right click->Open with->My Program.
I just want the file path when using this method.

Lyk Koss
- 1
- 2
0
votes
1 answer
How to set default directory for Excel's GetOpenFilename using Outlook VBA?
I'm trying to set the default directory for the VBA function GetOpenfilename. I managed to get it working before but lost the code before saving it.
Sub Sample2()
Dim myFile As Variant
Dim i As Integer
Dim myApp As Excel.Application
…

Andy M
- 167
- 1
- 3
- 17
0
votes
1 answer
Explorer-type custom dialog is maximized on the first open in the application
I have customized an explorer type browse dialog and added some controls. Upon opening the dialog, even though I have specified the width and height on the template resource, it is showing in maximized state.
I have tried to override this behavior…

fidel espanto
- 11
- 2
0
votes
1 answer
VBA to copy all sheets from multiple workbooks
I'm trying to make a VBA that would open multiple workbooks ( only one also), copy all their sheets in another workbook. I want to make my code functional directly from PersonalWorkbook so that i can use it in any new workbook that i want.
I know…

Robert Cenusa
- 7
- 1
0
votes
1 answer
How to get the file name in Flutter when using dart:HTML library to pick file in Flutter Web?
In my project, I have defined a function uploadPdf().
Calling this function at Raised Button to pick a file and it works fine. And it printing the fileName. Now what I want to get that fileName to Text Widget. For that, I defined fileName as a…

Prateek
- 502
- 5
- 16
0
votes
1 answer
Create a file with an input
I have an issue with an open file. First I need to design the name of my file, then it supposed to create a file in a block note with format .txt. Also, I have to use %less in order to print the file.
This is my code:
def file():
…

LOS 4 A
- 1
- 1
0
votes
0 answers
VBA - Extract workbook name from array of workbooks open through getopenfilename
Hey I have got the code below. I wanna be able to open mutiple workbooks through application.getopenfilename and then extract the respective book names to compare them to a list.
I don't why but whenever I try to extract the workbook name the "…

Brendan
- 1
0
votes
0 answers
How do I open a file (a_file.text) using a function in main?
Global variables:
FILE* gfptrIn = NULL;
FILE* gfptrOut = NULL;
FILE* gfptrKey = NULL;
char gInFileName[256];
char gOutFileName[256];
char gKeyFileName[256];
Here are the functions that would open the input file and output file:
FILE*…

user13050431
- 41
- 4