예제 #1
0
파일: MMExcel.cs 프로젝트: mmeents/MMExcel
 public MMRng(MMWS aOwner, string sCellA, string sCellB)
 {
     Owner = aOwner;
     CellA = sCellA;
     CellB = sCellB;
     Rng   = aOwner.WS.get_Range(CellA, CellB);
 }
예제 #2
0
파일: MMExcel.cs 프로젝트: mmeents/MMExcel
        public void New()
        {
            if (xlBook == null)
            {
                if (xlApp == null)
                {
                    xlApp = new Excel.Application();
                }
                xlBook = xlApp.Workbooks.Add(mv);
                xlBook.CheckCompatibility = false;

                MMWS aWS = new MMWS(this, xlBook.Worksheets.get_Item(1));
                Sheet.Add(aWS);
            }
            else
            {
                Close();
                New();
            }
        }
예제 #3
0
파일: MMExcel.cs 프로젝트: mmeents/MMExcel
 public void Open(string sFileNamePath)
 {
     if (xlBook == null)
     {
         if (xlApp == null)
         {
             xlApp = new Excel.Application();
         }
         FilePathName = sFileNamePath;
         xlBook       = xlApp.Workbooks.Open(FilePathName, true, false, mv, mv, mv, mv, mv, mv, true, mv, mv, mv, mv, mv);
         xlBook.CheckCompatibility = false;
         Int32 iSheetCount = xlBook.Sheets.Count;
         for (Int32 i = 1; i <= iSheetCount; i++)
         {
             MMWS aWS = new MMWS(this, xlBook.Worksheets.get_Item(i));
             Sheet.Add(aWS);
         }
     }
     else
     {
         Close();
         Open(sFileNamePath);
     }
 }