Looks like there is a flow in this code:
int x = (table1.Rows.Count / 450);
for (int i = 0; i < x; i++) {
...
}
If I don't make a mistake, it will fill only full sheets and miss the last partial sheet.
if there are 850 records, the resulting workbook will have only 1 sheet of 450 records.
with this change, the last partial sheet will be included:
int x = table1.Rows.Count;
for (int i = 0; i < x; i+= 450) {
...
}
I don't know why you split your base in multi sheets of 450 records, but it is certainly easier to put all records in 1 sheet.
Since Excel 2007, the limit is 1,048,576 rows per sheet.