Hi,
I was exploring Aspose Cells. I created a new prject and added aspose cells dll to it. I am trying to pull the data from database using a SQL query(planning to replace it with stored procedure call) and get the results into excel file called sample1.xls.
I wrote following code. Is there anything that I am missing? because following code is not giving any errors but also not writing any data into the excel sheet.
Waiting for your suggestions.
myConnection.ConnectionString = Con;
myConnection.Open();
SqlCommand myCommand = new SqlCommand();
myCommand.Connection = myConnection;
myCommand.CommandText = "Select * from Claims";
DataSet dt1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(myCommand.CommandText,myConnection);
da1.Fill(dt1);
WorkbookDesigner design1 = new WorkbookDesigner();
design1.Open(Server.MapPath("~/sample1.xls"));
design1.SetDataSource(dt1);
design1.Process(0,true);
Thanks.