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

LoadFromDataTable Throws ArgumentException

Nov 29, 2011 at 7: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 9:34 AM
Edited Nov 29, 2011 at 9:36 AM

I have just answered it on Stackoverflow.

You need to specify the range:

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