...
코드 블럭 | ||||
---|---|---|---|---|
| ||||
public DatasetModel AddDataset( Excel.Workbook wbobj, string dsCode, string dsName, enOutputType outputType, Excel.Range target ) |
Parameters
wbobj |
---|
Type: Excel.Workbook
...
dsCode |
---|
Type: String
Dataset Key값
dsName |
---|
Type: String
Dataset 표시명
outputType |
---|
Type: enOutputType
public enum enOutputType
{
outNone = 0,
outList = 1,
outPivot = 2,
}
...
outNone | 0 | |
outList | 1 | 표 형태 출력 |
outPivot | 2 | Pivot 형태 출력 |
target |
---|
Type: Excel.Range
출력 위치
Return ValueReturns
Type: Object (DatasetModel)
...
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Sub TestAddDatasetCreateDataset() Dim addin As COMAddIn Dim mxmodule As Object Dim ds As Object Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").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, "DS1DS2", "DS1DS2", 1, Range("D1!A1")) End Sub |