...
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Sub CreateDataset() Dim addin As COMAddIn Dim mxmodule As Object Dim ds As Object Set addinmxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule") Set mxmodule = addin.Object Set ds = mxmodule.viewmodel.activebook.CreateDataset("DS2", "DS2") 'datasetCode, datasetName ds.sourcesql = "select * from mtx_user" ds.ConnectionCode = "MTXRPTY" 'DBMS_CODE mxmodule.viewmodel.activebook.AddDataset ds mxmodule.xapi.AddDataset ThisWorkbook, "DS2", "DS2", 1, Range("D1!A1") End Sub |