/// <summary>
/// 新建一个DataTable(只针对一列)
/// </summary>
/// <param name="dataStr"></param>
/// <param name="titleName"></param>
/// <returns></returns>
private DataTable NewDataTable(string[] dataStr, string titleName)
{
try
{
DataTable ptDt = new DataTable();
ptDt.Columns.Add(titleName);
for (int i = ; i < dataStr.Length; i++)
{
DataRow ptFixed = ptDt.NewRow();
object[] objFixed = { dataStr[i] };
ptFixed.ItemArray = objFixed;
ptDt.Rows.Add(ptFixed);
}
return ptDt;
}
catch { return null; }
}
04-19 21:15