How do you correctly truncate a worksheet?

Using the code below, I'm able to clear out some of the rows, but not all 
of them.

                // Iterate through each worksheet in the spreadsheet.
                foreach (WorksheetEntry wEntry in wsFeed.Entries)
                {
                    if (wEntry.Title.Text == appSettings["worksheettitle"])
                    {                       
                        AtomLink listFeedLink = 
wEntry.Links.FindService(GDataSpreadsheetsNameTable.ListRel, null);

                        ListQuery listQuery = new 
ListQuery(listFeedLink.HRef.ToString());
                        ListFeed listFeed = service.Query(listQuery);
                        
                        //truncate sheet
                        foreach (ListEntry row in listFeed.Entries)
                        {
                            row.Delete();
                        }                        
                    }
                }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to