Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



SELECT * FROM [Sheet1$] WHERE FiscalPeriod='Q1-2010'

^^^ gives an error message ("No value given for one or more required
parameters."). I assume this is because FiscalPeriod does not mean
anything to the query

SELECT * FROM [Sheet1$] WHERE 'FiscalPeriod'='Q1-2010'

^^^ no error message but does not return results

"FiscalPeriod" is the column header in row 1 of the source worksheet.

On Feb 26, 12:49 pm, Dick Kusleika <dkusle...@xxxxxxxxx> wrote:
On Thu, 26 Feb 2009 08:20:31 -0800 (PST), ramz <djr...@xxxxxxxxx> wrote:
no one has any ideas on this one? hrmpf.

On Feb 25, 4:46 pm, ramz <djr...@xxxxxxxxx> wrote:
So, I'm attempting to grab a subset of data from one master
spreadsheet based on the value of a cell in a specific row to
determine if it should be imported or not. I've managed to create the
connection which imports the entire table, but short of using
filtering in the importing sheet (which won't work for my purposes
because I need to do sum operations and such and the filtering only
seems to hide the rows I don't want but does not exclude data found
therein when range sums are used) I can't seem to figure out a way to
make the data connection do the filtering for me. Being that this
seems to use SQL language (and mind you, I'm not an SQL expert, but I
have picked up a few phrases along the way) I would think that I could
type something like this in the "Command Text" box in the Definition
tab of the Connection Properties dialog:

SELECT * FROM [Sheet1$] WHERE < range or column or whatever > = '<
VALUE >'

I *think* the problem is that I can't find documentation that would
tell me what the syntax of the "< range or column or whatever >" bit
would actually be. I've tried a zillion different things to no avail.
Could someone point to some documentation or provide some insight on
getting this working? Thanks!

It should be whatever is in Row 1 of Sheet1.  It will assume that Row 1
contains field names.  Assume A1:C2 is

Name    Number  Amount
Ramz    1               12.00

..WHERE Number>=1

should work for a WHERE clause.
--
Dick Kusleika
Microsoft MVP-Excelhttp://www.dailydoseofexcel.com

.



Relevant Pages

  • Re: receiving But unable to send mail
    ... if Ultravision was not supplying your connection to the Internet ... the owner of the SMTP server ... Ask your home ISP if they have a port other than '25' for SMTP. ... As for sending taking several tries, is there an error message when it ...
    (microsoft.public.windows.vista.mail)
  • Re: connection to server failed
    ... The second error message pertains to sending. ... the owner of the SMTP server you are using must be ... the same as the entity providing your Internet connection at that moment. ... If you frequently send from multiple locations, get a free Gmail account, ...
    (microsoft.public.windows.vista.mail)
  • Re: [problem] with installation of lexmark x5250
    ... it should come with an error message. ... >> was not able to successfully install the printer and then my only choice ... the connection ... >> try to restore it to. ...
    (microsoft.public.windowsxp.print_fax)
  • Getting an error while testing my first WCF service
    ... Pro SP2) under IIS, I am using wsHttpBinding. ... "The underlying connection was closed: ... According to the stack dump the InnerException has this error message: ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Limited or no connectivity error after installing sp2
    ... > computer up to a router now with another computer, ... following error message in the System Tray: ... "This connection has limited or no connectivity. ... to access the Internet or some network resources. ...
    (microsoft.public.windowsxp.network_web)