The information in this article applies to:
SYMPTOMSWhen you use the Get External Data command on the Data menu to return data from an external data source, the data that is returned is not correct. Some fields or rows that should contain data are blank; or some fields or rows contain incorrect data. CAUSE
This problem may occur when Microsoft Excel uses the Microsoft Query
dynamic data exchange (DDE) Fetch command to return the data to the
worksheet.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. The problem has been corrected in Microsoft Excel 97 for Windows. MORE INFORMATION
For additional information on using DDE with Microsoft Query, please see
the following articles in the Microsoft Knowledge Base:
You can use the following workarounds to avoid the problem described above. Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400. The following methods describe macros that you can use to successfully return external data to your worksheet. Method 1: Using Data Access Objects (DAO)You can use DAO in your macro to return the data to the worksheet. If you use this method, you must specify the path to the database, the Structured Query Language (SQL) statement for the query, and the destination cell for the data. The following macro example returns the data without any user interaction. To use this macro, use the following steps:
Method 2: Using DDE with Microsoft QueryYou can use DDE with Microsoft Query to return the data to the worksheet. When you use this method, you interactively select the data source, select the database, and create the query. To use this macro, use the following steps:
NOTE: This example uses the DDE Fetch command to return the data to the worksheet 100 rows at a time. To increase or decrease the number of rows that are returned, modify the Step argument in the following line:
REFERENCES
For more information about Data Access Objects, click the Index tab in
Microsoft Excel Help, type the following text
and then double-click the selected text to go to the "Using Data Access" topic. Additional query words: garbage character gap missing XL7 nothing nil nada
Keywords : kbtool xlvbainfo xlquery xldao |
Last Reviewed: June 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |