Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT MYTABLE
COPY TO (M.TEMPDIR+"MYREPORT.XLS") XL5
BROWSER(M.TEMPDIR+"MYREPORT.XLS")
FUNCTION BROWSER
LPARAMETERS m.FILENAME
LOCAL LNRETVAL, LCOPERATION
LCOPERATION = "Open"
IF MYFILE(m.FILENAME)
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER handle,;
STRING @sFile,;
STRING @lp,;
STRING @DIR,;
STRING @dir1,;
INTEGER ncmd
LNRETVAL = SHELLEXECUTE(0, LCOPERATION, m.FILENAME, "", "", 1)
ELSE
MESSAGEBOX("Unable to locate the File : "+m.FILENAME,48,"Problem")
ENDIF
RETURN(.F.)
FUNCTION MYFILE
PARAMETER m.FILENAME,m.RETNAME,m.RETSIZE
PRIVATE m.FILENAME,m.RETNAME,m.RETVAL
IF PCOUNT() < 3
m.RETSIZE = .F.
ENDIF
IF PCOUNT() < 2
m.RETNAME = .F.
ENDIF
IF m.RETSIZE
m.RETVAL = 0
ELSE
IF m.RETNAME
m.RETVAL = ""
ELSE
m.RETVAL = .F.
ENDIF
ENDIF
ON ERROR DO FILEERR
IF !EMPTY(m.FILENAME)
IF ADIR(TMPDIRFILES,m.FILENAME) > 0
IF m.RETSIZE
m.RETVAL = TMPDIRFILES(1,2)
ELSE
IF m.RETNAME
m.RETVAL = TMPDIRFILES(1,1)
ELSE
m.RETVAL= .T.
ENDIF
ENDIF
ENDIF
RELEASE TMPDIRFILES
ENDIF
RETURN(m.RETVAL)
I want to create a excel report