프로젝트

일반

사용자정보

통계
| 개정판:

hytos / ID2.Manager / ExcelAddin / ID2ManagerImport / ID2Ribbon.cs @ 2ade1e61

이력 | 보기 | 이력해설 | 다운로드 (1.32 KB)

1 43ceb5b3 taeseongkim
using Microsoft.Office.Tools.Ribbon;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Windows.Forms;
7
8
namespace ID2ManagerImport
9
{
10
    public partial class ID2Ribbon
11
    {
12
        private void ID2Ribbon_Load(object sender, RibbonUIEventArgs e)
13
        {
14
15
        }
16
17
        private void btnSend_Click(object sender, RibbonControlEventArgs e)
18
        {
19
            Microsoft.Office.Interop.Excel.Worksheet sheet = Globals.ThisAddIn.Application.ActiveSheet;
20
21 0688f998 taeseongkim
            try
22
            {
23
                if (DataManager.Import(Globals.ThisAddIn.Application.ActiveWorkbook.Name, sheet))
24
                {
25
                    MessageBox.Show("Send data Ok");
26
                }
27
            }
28
            catch (Exception ex)
29
            {
30
                MessageBox.Show(ex.Message);
31
            }
32
            finally
33 43ceb5b3 taeseongkim
            {
34 0688f998 taeseongkim
                Globals.ThisAddIn.Application.Cursor = Microsoft.Office.Interop.Excel.XlMousePointer.xlDefault;
35 43ceb5b3 taeseongkim
            }
36
        }
37
38
        private void btLoad_Click(object sender, RibbonControlEventArgs e)
39
        {
40
            Microsoft.Office.Interop.Excel.Worksheet sheet = Globals.ThisAddIn.Application.ActiveSheet;
41
        
42
            if (DataManager.Export(sheet))
43
            {
44
                MessageBox.Show("Read Ok");
45
            }
46
        }
47
48
    }
49
}
클립보드 이미지 추가 (최대 크기: 500 MB)