Page 1 of 1
totally lame Excel question
Posted: Fri Sep 03, 2004 6:16 pm
by Nonius
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?
totally lame Excel question
Posted: Fri Sep 03, 2004 6:45 pm
by monkeyA
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)
totally lame Excel question
Posted: Fri Sep 03, 2004 7:26 pm
by manta
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
totally lame Excel question
Posted: Fri Sep 03, 2004 7:45 pm
by Nonius
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.
totally lame Excel question
Posted: Fri Sep 03, 2004 9:41 pm
by Graeme
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.
totally lame Excel question
Posted: Fri Sep 03, 2004 10:32 pm
by Nonius
I'll try that Graeme, then I'll go and kill some Lotus Notes people if it doesn't work.
totally lame Excel question
Posted: Mon Sep 06, 2004 9:17 am
by Nonius
didn't work.
totally lame Excel question
Posted: Wed Sep 07, 2011 7:24 pm
by jungle
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.
totally lame Excel question
Posted: Wed Sep 07, 2011 11:14 pm
by Hansi
Label or tooltip? If label how about just inserting a textbox drag it to it's place and then group them?
totally lame Excel question
Posted: Thu Sep 08, 2011 3:36 am
by YukaRedux
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).