/// </summary>
/// <param name="objFileRelativePath">导入Word文件拷贝在服务器上的全路径</param>
/// <param name="sScript">出错时的提示信息</param>
/// <param name="listRptID">导入生成报告的ID数组</param>
/// <param name="strXMLPath">用于数据验证的XML文件名</param>
/// <param name="strButID">导入按钮ID</param>
private void ImportWord(ref object objFileRelativePath, StringBuilder sScript, ref ArrayList listRptID,string strXMLPath,string strButID)
{
Microsoft.Office.Interop.Word.ApplicationClass wordApp = null;
object Missing = Type.Missing;
Microsoft.Office.Interop.Word.Document wordDoc = null;
using (clsDbAccept db = new clsDbAccept())
{
try
{
wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
wordDoc = wordApp.Documents.Open(ref objFileRelativePath, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing);
//导入报告的创建者为当前用户
string strCreater = Session["UserID"] != null ? Session["UserID"].ToString() : string.Empty;
#region XML文件,用于校验上传Word中数据的正确性
strXMLPath = this.Server.MapPath(clsCommon.GetUrl(this, strXMLPath));
DataSet dsXML = ReadXMLFile(strXMLPath);
//所有报告信息构成的表
DataTable dtTable = null;
//单个具体报告构成的表
DataTable dtCol = null;
//特殊报告项验证信息构成的表
DataTable dtColCondition = null;
DataView dvTable = null;
DataView dvCol = null;
if (dsXML != null && dsXML.Tables.Count > 1)
{
dtTable = dsXML.Tables[0];
dtCol = dsXML.Tables[1];
if (dsXML.Tables.Count > 2)
{
dtColCondition = dsXML.Tables[2];
}
}
if (dtTable != null && dtTable.Rows.Count > 0)
{
dvTable = dtTable.DefaultView;
dvTable.RowFilter = string.Format("[TableType]='{0}'", strButID);
dtTable = dvTable.ToTable();
}
//表格内容开始行
int IntStartRowIndex = Convert.ToInt32(dtTable.Rows[0]["StartRowIndex&#