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