Problem in Excel Charting

  • Thread starter Thread starter sumathi
  • Start date Start date
S

sumathi

Hi,

I have the following problem in chart

Steps Followed

1)Open a new Excel Workbook
2)Associate a database query (Select getdate() as
TodayDate ) with A1 Cell.
This would return "TodayDate" in A1 and current Date in A2
cell
3)Select the following from "Insert" Menu - "Name" -
"Define"
4)There we can find the Names of the Workbook - Which
includes the Name for the Data Range associated with the
Query (added during STEP 2)
5)The value shown is =Sheet1!$A$1:$A$3 although only A1
and A2 are populated.


Could someone please explain the inconsistency.

Thanks and Regards,
Sumathi
 
Hi Sumathi,

If I run the query "Select getdate() as TodayDate" in Query Analyser, I get
5 lines of output
i.e.
TodayDate
------------------------------------------------------
2004-06-11 17:08:56.470

(1 row(s) affected)

Don't know how you are running this in Excel, but I am not surprised if MS
Query outputs a blank line as well as the query output.

Perhaps you could use the Excel function =NOW() to return the current system
date.
Or, you could define a new range in Excel using Insert - Name - Define
MyRange =OFFSET(Query_from_MSQuery,0,0,ROWS(Query_from_MSQuery)-1)

Then MyRange has one less row than Query_from_MSQuery

Ed Ferrero
http://edferrero.m6.net
 
Back
Top