您好,
您的问题经过调查,答复如下:
1.目前支持的方式是使用DataSource,支持数据源和XML的格式,不支持JSON。
- Private Sub Command1_Click()
- ' Create recordset using Biblio and bind to Spread
- Set rec = New ADODB.Recordset
- Set Conn = New ADODB.Connection
- Query = "select * from Titles;"
- Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "C:\Program Files\Microsoft Visual Studio\VB\biblio.mdb;Persist Security Info=False"
- rec.Open Query, Conn, adOpenKeyset, adLockOptimistic
- Set fpSpread1.DataSource = rec
- End Sub
- Private Sub fpSpread1_DataLoaded()
- Label1.Caption = "Data has been loaded"
- End Sub
复制代码
- Private Sub Command1_Click()
- Dim Buffer As String
- Dim dso As New XMLDSOControl
- Dim doc As IXMLDOMDocument
- Dim da As New DataAdapter
- Dim rs As New ADODB.Recordset
- Call fpSpread1.ExportToXMLBuffer("Root", "Collection", Buffer, ExportToXMLUnFormattedData, "")
- ' Load the XML data into an XML DSO control
- Set doc = dso.XMLDocument
- doc.loadXML (Buffer)
- ' Map the DSO into a new Recordset object
- ' using a DataAdapter
- Set da.Object = dso
- Set rs.DataSource = da
- Set DataGrid1.DataSource = rs.DataSource
- End Sub
复制代码
2.控件有内置的设计器,支持保存和加载
3.支持自定义的公式。 |