Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Here is some code snippet for your reference. Dim cat As Object Dim tbl As Object Dim col As Object Set cat = CreateObject("ADOX.Catalog") cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "E:\test\excel\test2.xls;Extended Properties=Excel 8.0" Set tbl = CreateObject("ADOX.Table") tbl.Name = "TestTable" Set col = CreateObject("ADOX.Column") With col .Name = "Col1" .Type = adDouble End With tbl.Columns.Append col Set col = Nothing Set col = CreateObject("ADOX.Column") With col .Name = "Col2" .Type = adVarWChar End With tbl.Columns.Append col cat.Tables.Append tbl Best regards, Perter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing worksheet references | Excel Worksheet Functions | |||
Excel platforms | Excel Discussion (Misc queries) | |||
Need a count of #of times a result occurred on multiple platforms | Excel Worksheet Functions | |||
Changing many references at a time. | Excel Discussion (Misc queries) | |||
Changing cell references | Excel Discussion (Misc queries) |