/// <summary>
		/// Replace all esxiting scritps depend value sheet
		/// </summary>
		/// <param name="sourceDependFile">sourceDependFile</param>
        public void replaceAllValDependList(string sourceDependFile)
        {
        	objExl_Source = new Excel.ApplicationClass();
            string dir = Path.Combine(System.IO.Directory.GetCurrentDirectory(), "../../keywordscripts");
            System.IO.DirectoryInfo sourceDir = new System.IO.DirectoryInfo(dir);
            FileInfo[] files = sourceDir.GetFiles();

            foreach (FileInfo file in files)
            {
                Directory.CreateDirectory(dir + "/newKeywordscripts");

                File.Copy(System.IO.Directory.GetCurrentDirectory() + "/keywordscripts/" + sourceDependFile+".xlsx", dir + "/newKeywordscripts/" + "Temp" +file.Name , true);
                DependentValReplace(dir + "/" + file.Name, dir + "/newKeywordscripts/" + "Temp" + file.Name);
                File.Copy(dir + "/newKeywordscripts/" + "Temp" + file.Name, dir + "/newKeywordscripts/" + file.Name, true);
            }

            foreach (FileInfo file in files)
            {
                File.Delete(dir + "/newKeywordscripts/" + "Temp" + file.Name);
            }
           
        }
Example #2
0
 //**********************************************************************
 /// <summary>
 /// Close the excel
 /// </summary>
 public void close()
 {
     xBook.Save();
     excelMain.Quit();
     excelMain = null;
 }
Example #3
0
 //**********************************************************************
 /// <summary>
 /// Constructer. new excel application process
 /// </summary>
 public LxXlsOper()
 {
     excelMain = new Excel.ApplicationClass();
 }