Vous êtes sur la page 1sur 3

dim hoja as object dim celda as object dim columna as integer dim fila as integer

for num=0 to 41

for columna=1 to 26 for fila=1 to 100 hoja=thiscomponent.sheets(num) celda=hoja.getcellbyposition(columna,fila)

if columna = 1 and celda.getformula <> "" then cont=cont+1 end if

if celda.getformula="funcional" or celda.getformula="Funcional" or celda.getformula="FUNCIONAL" then funcional=funcional+1 end if

if celda.getformula="no funcional" or celda.getformula="No Funcional" or celda.getformula="NO FUNCIONAL" or celda.getformula="No funcional" then nofuncional=nofuncional+1 end if

if celda.getformula="En caja" then caja=caja+1

end if

if celda.getformula="Pc" or celda.getformula="PC" or celda.getformula="pc" then pc=pc+1 end if

if celda.getformula="laptop" or celda.getformula="Laptop" then laptop=laptop+1 end if

if columna=3 then columna=8 end if

if columna = 8 and celda.getformula <> "" then impresora=impresora+1 end if

if columna=9 then columna=24 end if

if columna = 24 and celda.getformula <> "" then red1=red1+1 end if

if columna=25 then columna=26 end if

if columna = 26 and celda.getformula <> "" then red2=red2+1 end if

next fila next columna next num

hojaimprimir=thiscomponent.sheets(44) total=hojaimprimir.getcellbyposition(4,3).setformula(cont) funcional=hojaimprimir.getcellbyposition(4,4).setformula(funcional) nofuncional=hojaimprimir.getcellbyposition(4,5).setformula(nofuncional) caja=hojaimprimir.getcellbyposition(4,6).setformula(caja) pc=hojaimprimir.getcellbyposition(4,7).setformula(pc) laptop=hojaimprimir.getcellbyposition(4,8).setformula(laptop) impresora=hojaimprimir.getcellbyposition(4,9).setformula(impresora) red1=hojaimprimir.getcellbyposition(4,12).setformula(red1) red2=hojaimprimir.getcellbyposition(4,11).setformula(red2)

Vous aimerez peut-être aussi