Page 1 of 1

DC_Workarea2excel - error Freezepanes

Posted: Tue Dec 13, 2022 8:24 am
by Victorio
Hi, Roger,

Sometimes my clients have problem, when creating xls table with function DC_Workarea2excel.
Only on some computers, and on more than one row header.

I found solution, in function DC_Workarea2excel where is row :

oSheet:Application:ActiveWindow:FreezePanes:=.T.

i replace it with this :

Code: Select all

   oSheet:Application:ActiveWindow:FreezePanes := .F.
   if nHeadRows=1
	   oSheet:Rows("2:2"):Select	
   elseif nHeadRows=2
	   oSheet:Rows("3:3"):Select
   elseif nHeadRows=3
	   oSheet:Rows("4:4"):Select
   else
   	   oSheet:Rows("2:2"):Select
   endif
   oSheet:Application:ActiveWindow:FreezePanes := .T.
This is example, when number of header rows are variable.

No need upgrade _dcfunct.prg, I create copy of DC_Workarea2excel to other function DC_Workarea2excel2, and use it in my source.

Maybe someone had problems with it too.

Viktor

Re: DC_Workarea2excel - error Freezepanes

Posted: Tue Dec 13, 2022 10:41 am
by skiman
Hi Viktor,

Sometimes a customer gets an error on the Freezepane. I will try this.

Re: DC_Workarea2excel - error Freezepanes

Posted: Tue Dec 13, 2022 3:21 pm
by rdonnay
Thank you Victor, for your contribution.