Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a value in Excel
#17
This way only works if the sheet[x] is selected.

This is the function I was working...

Member function ExcelSheet.findAll
Code:
Copy      Help
function'str str&encontrados str'texto [entera] [insensitive]

if(!ws) Init

Excel.Worksheet w
Excel.Range found found1
foreach w ws.Application.Worksheets
,VARIANT lookat matchcase
,if(entera) lookat=Excel.xlWhole
,else lookat=Excel.xlPart
,if(insensitive)
,,matchcase=FALSE
,else matchcase=TRUE
,found=w.UsedRange.Find(texto @ @ lookat @ 1 matchcase)
,if(!found) continue
,rep
,,str temp=found.Address(0 0 1 1)
,,if(findw(encontrados temp 0 1)>=0) break
,,encontrados.formata("%s[]" temp)
,,found1=found
,,found=w.Cells.FindNext(found1)
encontrados.ordenar(0 0 1 0 0 1)
encontrados.trim

ret numlines(encontrados)
err+ end _error


I try to create a QM dialog to select the found items.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)