Border.InsideBorder OutOfMemoryException

Dec 18, 2013 at 4:54 AM
I have a huge worksheet, of around 70000 rows by 20 cells. When I go and format the borders it takes a exception "System.OutOfMemoryExceptio".I use:

worksheet.RangeUsed().Style.Border.OutsideBorder = XLBorderStyleValues.Thin
worksheet.RangeUsed().Style.Border.InsideBorder = XLBorderStyleValues.Thin

If I delete the code to set the border,It work OK. Is there any other way to do this?