I couldn't get the code that I translated from Excel's macro to work to hide a column.
I was using
- Code: Select all Expand view
- oSheet:columns("B:B"):EntireColumn:Hidden := .t.
Anyone with any suggestion to make it work?
oSheet:columns("B:B"):EntireColumn:Hidden := .t.
oSheet:Cells(nRow,10):Value := "Total del pronóstico:"
oSheet:Cells(nRow,10):HorizontalAlignment := nRight
oSheet:Cells(nRow,10):Font:Bold := (.T.)
oSheet:Cells(nRow,11):Value := "=SUMA(K6:" + "K"+ALLTRIM(STR(nRow - 1,03,0)) + ")"
oSheet:Cells(nRow,11):Font:Bold := (.T.)
oSheet:Columns( "A" ):AutoFit()
oSheet:Columns( "B" ):AutoFit()
oSheet:Columns( "C" ):AutoFit()
oSheet:Columns( "D" ):AutoFit()
oSheet:Columns( "E" ):AutoFit()
oSheet:Columns( "F" ):AutoFit()
oSheet:Columns( "G" ):AutoFit()
oSheet:Columns( "H" ):AutoFit()
oSheet:Columns( "I" ):AutoFit()
oSheet:Columns( "J" ):AutoFit()
oSheet:Columns( "K" ):AutoFit()
oSheet:Columns( "L" ):AutoFit()
oSheet:Columns("B:B"):EntireColumn:Hidden := (.T.) <-------------------------
oExcel:Get("ActiveWorkBook"):SaveAs(ALLTRIM(oApp:cPathXlsx) +;
"PDP_" + DTOS(dFecPag) +;
".Xlsx")
oSheet:=NIL
oExcel:Quit()
oExcel:=NIL
oSheet:Columns("A:L"):autofit()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 102 guests