I have created this code which extracts data from sqlserver
and imports it directly my excel spread sheet.
Public Sub DataExtract()
' Create a connection object.
Dim cnPubs As ADODB.Connection
Set cnPubs = New ADODB.Connection
' Provide the connection string.
Dim strConn As String
'Use the SQL Server OLE DB Provider.
strConn = "PROVIDER=SQLOLEDB;"
'Connect to the Pubs database on the local server.
strConn = strConn & "DATA SOURCE=(local);INITIAL CATALOG=pubs;"
' Create a recordset object.
Dim rsPubs As ADODB.Recordset
Set rsPubs = New ADODB.Recordset
' Assign the Connection object.
.ActiveConnection = cnPubs
' Extract the required records.
.Open "SELECT * FROM Authors"
' Copy the records into cell A1 on Sheet1.
' Tidy up
Set rsPubs = Nothing
Set cnPubs = Nothing
It works fine,
i have saved it as an add in and can view it from the tools
But it is not visible in under the format tool bar.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program.
Download Eclipse installation zip file:
Extract files from zip file:
Download and install JDK 8:
Open Eclipse and …