I got exception on cells when ImportDataTable to cells. The following code I copy from the Demo. I got the exception like that.
BoolValue = ‘(workbook.Worksheets[0].Cells).FirstCell.BoolValue’ threw an exception of type 'Aspose.Cells.CellsException’
base {System.ApplicationException} = {“Cell value type is not booleanin CellC3”}
DataTable dataTable = new DataTable(“Products”);<span style="color:green;">//Adding columns to the DataTable object</span> dataTable.Columns.Add(<span style="color:#a31515;">"Product ID"</span>, <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Int32</span>)); dataTable.Columns.Add(<span style="color:#a31515;">"Product Name"</span>, <span style="color:blue;">typeof</span>(<span style="color:blue;">string</span>)); dataTable.Columns.Add(<span style="color:#a31515;">"Units In Stock"</span>, <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Int32</span>)); <span style="color:green;">//Creating an empty row in the DataTable object</span> <span style="color:#2b91af;">DataRow</span> dr = dataTable.NewRow(); <span style="color:green;">//Adding data to the row</span> dr[0] = 1; dr[1] = <span style="color:#a31515;">"Aniseed Syrup"</span>; dr[2] = 15; <span style="color:green;">//Adding filled row to the DataTable object</span> dataTable.Rows.Add(dr); <span style="color:green;">//Creating another empty row in the DataTable object</span> dr = dataTable.NewRow(); <span style="color:green;">//Adding data to the row</span> dr[0] = 2; dr[1] = <span style="color:#a31515;">"Boston Crab Meat"</span>; dr[2] = 123; <span style="color:green;">//Adding filled row to the DataTable object</span> dataTable.Rows.Add(dr); <span style="color:#2b91af;">Workbook</span> workbook = <span style="color:blue;">new</span> <span style="color:#2b91af;">Workbook</span>(); <span style="color:green;">// Import data from the DataTable and create a stacked area chart from it.</span> workbook.Worksheets[0].Cells.ImportDataTable(dataTable, <span style="color:blue;">true</span>,<span style="color:#a31515;">"A1"</span>);</pre></div></div>