This project has moved. For the latest updates, please go here.

LoadFromDataTable Throws ArgumentException

Nov 29, 2011 at 8:49 AM

When I try to load my DataTable to a new Worksheet I'm getting  ArgumentException (Negative row and Columns numbers are not allowed)

I saw two question like this in the internet, with no answers: (first, second)

Why is this happening?  

Nov 29, 2011 at 10:34 AM
Edited Nov 29, 2011 at 10:36 AM

I have just answered it on Stackoverflow.

You need to specify the range:

worksheet.Cells("A1").LoadFromDataTable(yourTable, False)