+ Reply to Thread
Results 1 to 3 of 3

Data connection not importing all rows into Excel from SQL Server

  1. #1
    Registered User
    Join Date
    11-01-2016
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    7

    Data connection not importing all rows into Excel from SQL Server

    Hello,

    I have a data connection in Excel 2013 that isn't importing all of the rows that it should be returning. When I run the query in SQL management studio, it returns the part numbers I'm looking for. However, when I refresh the data in excel with the same query, it's not importing all the rows from the query and I'm missing the part numbers that I'm looking for. Anybody have any suggestions on why this is happening or how I can fix it? Thanks.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Data connection not importing all rows into Excel from SQL Server

    Hi andrea,

    If you have defined a range of cells to be your data like $A$1:$D$200 and keep that range problems occur when you import more data. The example will only look at the first 200 rows but the second import may be 500 rows. I'd suggest you look at "Dynamic Named Ranges" for what you do your refresh on. These DNR grow and shrink to span all the data based on how many rows were imported.
    http://www.ozgrid.com/Excel/DynamicRanges.htm or
    https://www.vertex42.com/ExcelArticles/dynamic-named-ra nges.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-01-2016
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Data connection not importing all rows into Excel from SQL Server

    Hi Marvin,

    Thanks for the tip, I'll keep it in mind for the future. I discovered however, the answer was much simpler. My connection was to something that only updates once a day and so it took care of itself.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Connection but no records writing VBA query to retrieve data from SQL Server 2012
    By sportsguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2012, 03:20 PM
  2. Export Excel Table to SQL Server through ODBC Connection in Visual Basic
    By medberg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2011, 10:44 AM
  3. Excel Query connection to Server Help...
    By ImtiazV in forum Excel General
    Replies: 0
    Last Post: 08-03-2007, 11:04 AM
  4. Excel ODBC Connection to SQL Server table failed
    By lordsmusicalbox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2007, 03:52 PM
  5. [SOLVED] SQL Server (2005 or other) - Permissions on Views Excel Connection
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2006, 12:45 PM
  6. Excel VBA connection to SQL Server using ADO
    By Taolo Morake in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2005, 12:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1