Hi,
anyone out there who knows how to dump an entire(filled) datagrid from somewhere in my app into Excel?
Need to control these:
-use an existing sheet to send to
-have control over where (which cells) to send the data to
James aka Rossifumi
This is how to set it up:
Dim cn As New adodb.Connection
Dim rst As New adodb.Recordset
Dim sSql As String
Dim strA As String
Dim fso As New Scripting.FileSystemObject
Dim txtFile As Scripting.TextStream
With cn
.ConnectionString = mksConnectionString
.Open
End With
sSql =...
Dim cn As adodb.Connection
Dim rs As adodb.Recordset
Set cn = New adodb.Connection
cn.ConnectionString = your connection string
cn.Open
Set rs = New adodb.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "your table"
rs.ActiveConnection = cn
rs.Open...
Hi all,
my project is coming to an end, but it seems that the last part is the hardest.
Part of my application displays data in a datagrid, using an SQL qry.
I am creating a document in Word, using data from my app.
I also need to get the datagrid, or the data in the grid to that document.
If...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.