There is a excel template file with some conditions for cell formatting. First I use XlsIO to open the template in code.Then I insert some rows into the template use ISheet.InsertRow and save it in code behind.
After that I open the excel file, but the format of some conditions are changed, so it is not correct.
But open the template and insert row manually, the format of some conditions are not changed, and work fine.