Exemplo n.º 1
0
        private void GetDeleteItems(Application xlApp)
        {
            string   folderPath = configObj.HKSeaFolderPath;
            string   fileName   = "HKSEA-Z2.xls";
            Workbook hkSEABook  = ExcelOperation.OpenWorkBook(xlApp, folderPath, fileName);

            deleteItems.GetDeleteItemsFromWorkBook(hkSEABook);
            hkSEABook.Close(Missing.Value, Missing.Value, Missing.Value);
        }
Exemplo n.º 2
0
        private Workbook WriteIntoMaster(Application xlApp)
        {
            string   folderPath   = configObj.WarGuideBFolderPath;
            string   fileName     = "war_guideB.xls";
            Workbook warGuideBook = ExcelOperation.OpenWorkBook(xlApp, folderPath, fileName);

            CopyWarGuideBToBak(warGuideBook);

            warGuideBook = ExcelOperation.OpenWorkBook(xlApp, folderPath, fileName);
            warrantDataWriter.WriteIntoMasterSheet(warGuideBook, warrantDataItem, Logger);
            return(warGuideBook);
        }
Exemplo n.º 3
0
        private void GetDataFromFolderWarrent(Application xlApp, HKSpeedGuideXML xmlObj, Logger logger)
        {
            string        folderPath = configObj.WarrantFolderPath; //@"D:\HKRicTemplate\Warrant";
            List <string> fileNames  = FileUtil.GetTodayFileNameFromFolder(folderPath);

            if (fileNames != null && fileNames.Count > 0)
            {
                foreach (Workbook wBook in fileNames.Select(fileName => ExcelOperation.OpenWorkBook(xlApp, folderPath, fileName)))
                {
                    warrantDataItem.GetWarrantDataFromWorkBook(wBook, configObj, xmlObj, logger);
                    //wBook.Close(Missing.Value, Missing.Value, Missing.Value);
                }
            }
        }