以下代码的功能,是配合select,将Excel导出为XML文件。
Const stSQL As String = "SELECT * FROM [Report]"
Dim stCon As String
stCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ThisWorkbook.FullName & ";" & _
"Extended Properties=""Excel 8.0;HDR=Yes"";"
Dim rst As New ADODB.Recordset
Dim str As New ADODB.Stream
[ 查看全文 ]