Thanks a lot for your input. I'm getting a syntax error in the FOR EACH loop
I think that is for the assigment of oRow. Please can you help a little bit more.
Thanks
Luis
>Luis,
>
>Testing this from the command window:
>
>
oExcel = createobject("excel.application" )
>oExcel.Visible = .t.
>oExcel.Workbooks.Add()
>oSheet = oExcel.ActiveSheet
>oRow = oSheet.Rows(1)
>? oRow.Height
>oRow.Delete()
>
>So this loop ought to work:
>
>
for each loRow in oSheet.Rows()
> if ( loRow.Height = 3 )
> loRow.Delete()
> endif
>endfor
>
>Realize though that a spreadsheet has a lot of rows so it may take a long time to process unless you use something else to limit the number of rows that actually get processed.
>
>>Hi. I need to delete a series of rows in an excel sheet. The rows i need to delete are those that has a heigth< 3. So i will like to know how can i make it with a for loop. Maybe someone can give me an example of how to delete those rows without knowing the number. I wan't to make something like this:
>>
>>FOR EACH row
>> IF row.height < 3
>> row.delete
>> ENDIF
>>ENDFOR
I never forget a face, but in your case I will make an exception :-)