- Imports SpreadsheetGear
- Imports C1.Silverlight
- Imports C1.Silverlight.C1MessageBoxButton
- Imports C1.Silverlight.C1MessageBoxIcon
- Imports Newtonsoft.Json
- Imports Newtonsoft.Json.Linq
- Imports System.Windows.forms
- Namespace ExcelViewVBDotnet
- Public Class StandardInterface
- '预留位置1
- '预留位置2
- Dim EV As SpreadsheetGear.Windows.Co**ols.WorkbookView,AW As SpreadsheetGear.IWorkbook,Range As SpreadsheetGear.IRange
- Dim CF As TextBox
- Public Sub Workbook_Open(OldRoot As Object,NewRoot As Object,Excel As SpreadsheetGear.Windows.Co**ols.WorkbookView)
- EV = Excel
- Excel.GetLock()
- AW = Excel.ActiveWorkbook
- Range = AW.ActiveWorksheet.Range
- Excel.ReleaseLock()
- CF = CType(OldRoot.Children(1), TextBox)
- End Sub'打开时执行事件
- Public Sub RangeSelection(sender As Object,e As SpreadsheetGear.Windows.Co**ols.RangeSelectionChangedEventArgs)
- End Sub'单元格选择后执行的事件
- Public Sub RangeChanged(sender As Object,e As SpreadsheetGear.Windows.Co**ols.RangeChangedEventArgs)
- End Sub'单元格编辑完成后执行事件
- Public Sub ButtunClick(sender As Object,e As SpreadsheetGear.Windows.Co**ols.ShapeActionEventArgs)
- ActiveWorkbook.WorkbookSet.GetLock()
- If e.Shape.Name = "Button 2" Then
- CF.Tag = "1,查询全部" '公式类型:1为提取,2为传递。逗号后加执行的公式名称,与表间公式中的显示的名称一致
- CF.Text = "#执行公式" '执行提取公式写入"#执行公式",执行SQL语句写入"#执行SQL"
- With ActiveWorkbook.ActiveWorksheet.PageSetup
- .LeftHeader = ""
- .CenterHeader = ""
- .RightHeader = Range("A1").Text
- .LeftFooter = "&B 快表软件 &B"
- .CenterFooter = "&D"
- .RightFooter = " 第 &P 页"
- End With
- End If
- MessageBox.Show("页眉页脚已设置", "提示", MessageBoxButton.OK)
- ActiveWorkbook.WorkbookSet.ReleaseLock()
- End Sub'按钮/标签点击事件
- Public Sub FollowHyperlink(sender As Object)
- End Sub '暂不支持
- End Class
- ' 注:除事件字眼下可以自定义代码外的所有代码不允许改动,否则编译将有可能失败。
- End Namespace
复制代码
|
|
hessen