dgvEmployeeTimeSheet.DataSource = OCommonFunctions.SelectData("sp_GP_EmployeeTimeSheetDetailSelectForXLS", "@fromdate", dtpFromDate.Value.ToString("MM/dd/yyyy"), "@todate", dtpTODate.Value.ToString("MM/dd/yyyy"), "@companyid", cmbCompany.SelectedValue.ToString());
来自上述程序的数据将被纳入
for (i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
{
for (j = 0; j <= ds.Tables[0].Columns.Count - 1; j++)
{
data = ds.Tables[0].Rows[i].ItemArray[j].ToString();
xlWorkSheet.Cells[i + 1, j + 1] = data;
}
}
我该怎么办?