On Wednesday, April 14, 2021 at 6:06:26 PM UTC+5:30, Enrico Maria Giordano wrote:
Il 14/04/2021 13:20, timepro timesheet ha scritto:
is the drive name required while saving .xlsx file?
Yes, it is.
EMG
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
thanks emg
in my other app, i do not prefix the drive letter.
it works ok.
xlsname='\time\'+xlsfolder+'\'+xlsname && notice - no drive letter xstart=time();freezerow="4"
oexcel=createobject('excel.application') && HOW TO CHECK IF EXCEL IS LOCALLY INSTALLED OR IT IS OFFICE365 EXCEL
oexcel:workbooks:add()
osheet=oexcel:activesheet
if !empty(xsheetname);osheet:name:=xsheetname;end
do while ...condition.and.!eof()
...
...
skip
end
oexcel:activeworkbook:saveas(xlsname)
oexcel:workbooks:open(xlsname)
osheet=oexcel:activesheet()
osheet:rows(freezerow):select()
oexcel:activewindow:freezepanes=.t.
oexcel:visible=.t.
could it be:
-in my earlier example the .xlsm file was already existing & i was opening it (before the report process) & writing to it.
-in the above example, the .xlsx file was 'created' after the process is over. [ oexcel:activeworkbook:saveas(xlsname) ]
thanks for reading
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)