totally lame Excel question
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
I testing out connecting to a database from Lotus notes with some queries. So, thinking simply, I just wanted to create an Excel database. I run the one query that tells me that lists the labels in a table. then I run to see whats in the table and it says there's NOTHING in the table. so, what the fuk? then, in Excel, I tried to get external data by running a query on the Excel database, and it says there are no visible tables in the database. I already added the database in the ODBC configuration. thoughts?
Chiral is Tyler Durden
- monkeyA
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
Lotus Notes??? what kind of 3rd world bank do you work for!?
Are you doing this in VBA or by going Data....Import External Data... New Database Query ? (or whatever the options are in your 3rd world version of excel)
Are you doing this in VBA or by going Data....Import External Data... New Database Query ? (or whatever the options are in your 3rd world version of excel)
If there was problem, Yo I'll solve it
- manta
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
Nonius,
Sorry for the lame question, but did you try the example:
Uselsx "*LSXODBC"
Sub Initialize
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim firstName As String
Dim lastName As String
Dim msg As String
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("Data source name")
qry.SQL = "SELECT * FROM excel_sheet"
result.Execute
msg = "Results:" & Chr(10)
If result.IsResultSetAvailable Then
Do
result.NextRow
firstName = result.GetValue("first column", _firstName)
lastName = result.GetValue("second column", _lastName)
msg = msg & Chr(10) & firstName & " " & _lastName
Loop Until result.IsEndOfData
Messagebox msg,, "Results"
result.Close(DB_CLOSE)
Else
Messagebox "Cannot get result set"
Exit Sub
End If
con.Disconnect
End Sub
Sorry for the lame question, but did you try the example:
Uselsx "*LSXODBC"
Sub Initialize
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim firstName As String
Dim lastName As String
Dim msg As String
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("Data source name")
qry.SQL = "SELECT * FROM excel_sheet"
result.Execute
msg = "Results:" & Chr(10)
If result.IsResultSetAvailable Then
Do
result.NextRow
firstName = result.GetValue("first column", _firstName)
lastName = result.GetValue("second column", _lastName)
msg = msg & Chr(10) & firstName & " " & _lastName
Loop Until result.IsEndOfData
Messagebox msg,, "Results"
result.Close(DB_CLOSE)
Else
Messagebox "Cannot get result set"
Exit Sub
End If
con.Disconnect
End Sub
IT unhelpful desk
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
that is the identical code EXCEPT for.....
qry.SQL = "SELECT * FROM excel_sheet"
I have
qry.SQL = "SELECT * FROM Records"
where Records is the name of my sheet.
qry.SQL = "SELECT * FROM excel_sheet"
I have
qry.SQL = "SELECT * FROM Records"
where Records is the name of my sheet.
Chiral is Tyler Durden
- Graeme
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
You might need to say (indeed, you might have meant)
"SELECT * FROM sheets("" & Record & "")"
Also, you might check that you are 'with' the workbook, even if there is only one in play.
"SELECT * FROM sheets("" & Record & "")"
Also, you might check that you are 'with' the workbook, even if there is only one in play.
Graeme West
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
I'll try that Graeme, then I'll go and kill some Lotus Notes people if it doesn't work.
Chiral is Tyler Durden
- Nonius
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
- jungle
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
I have a totally lame Excel question that doesn't merit its own thread. Is there a way to label a single data point in a time series? I Googled this but didn't get any useful answers. I know the 'create another series' trick but it makes the chart visually messy.
it's axiomatic, deal with it.
- Hansi
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
Label or tooltip? If label how about just inserting a textbox drag it to it's place and then group them?
- YukaRedux
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
totally lame Excel question
Click on the chart and select the entire series. Then click on the datapoint you wish to label, so that just that datapoint is now selected. Then right-click the datapoint, hit "Add Data Label" and presto, the datapoint value appears. Right-click the new label, and hit "Format Data Label" to add the Series Name and Category Name as needed.
Hope that's what you wanted (Excel 2007, BTW).
Hope that's what you wanted (Excel 2007, BTW).
いづれのおほん時にか・・・