![]() List emptyRows = GetEmptyRows(allValues, totalRows, totalCols) I make 2 int lists, one keeps the row indexes to delete the other keeps the column indexes to delete. This is the array I loop through to get the indexes of the empty rows and columns. To avoid looping through the worksheet, I made a 2 dimensional object array from the cells returned from usedRange with: Excel.Range targetCells = worksheet.UsedRange So my solution tried to avoid any looping in the worksheet. ![]() I found that looping through the excel worksheet can take some time if the worksheet is large.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |