hytos / ID2.Manager / ExcelAddin / ID2ManagerImport / ID2Ribbon.cs @ 2ade1e61
이력 | 보기 | 이력해설 | 다운로드 (1.32 KB)
1 |
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 |
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 |
{ |
34 |
Globals.ThisAddIn.Application.Cursor = Microsoft.Office.Interop.Excel.XlMousePointer.xlDefault; |
35 |
} |
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 |
} |