ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   DGET Function + External data from another excel file (https://www.excelbanter.com/excel-worksheet-functions/101721-dget-function-external-data-another-excel-file.html)

Nader

DGET Function + External data from another excel file
 
Hello,

I'm trying to use the function DGET and get data from another excel
worksheets and it doesn't seems to work.

Does this looks correct : DGET ('c:\tmp\[tmp_excel.xls]'!A1:D20;"ID";A1:A2)
?

thanks in advance !

Nader



Harlan Grove

DGET Function + External data from another excel file
 
Nader wrote...
I'm trying to use the function DGET and get data from another excel
worksheets and it doesn't seems to work.

Does this looks correct : DGET ('c:\tmp\[tmp_excel.xls]'!A1:D20;"ID";A1:A2)


You should state how it doesn't work.

In this case, there are two problems. First, there's a syntax error.
Your external reference is either missing a worksheet name before the
exclamation point, or if the file has a single worksheet named
tmp_excel then you shouldn't have the square brackets around the base
filename. Second, DGET's first argument must be a range reference.
Excel doesn't consider references into closed workbooks to be range
references. That means you can't use DGET (or any of the other D...
functions) to refer to blocks of cells in other workbooks that could be
closed.

There are workarounds, but you'll need to provide the A1:D1 values
(field names) from the other file and the contents of the criteria
range.


Miguel Zapico

DGET Function + External data from another excel file
 
It looks like it is missing the worksheet name, something like:
DGET ('c:\tmp\[tmp_excel.xls]Sheet1'!A1:D20;"ID";A1:A2)
If the sheet is not called Sheet1, change as required

Hope this helps,
Miguel.

"Nader" wrote:

Hello,

I'm trying to use the function DGET and get data from another excel
worksheets and it doesn't seems to work.

Does this looks correct : DGET ('c:\tmp\[tmp_excel.xls]'!A1:D20;"ID";A1:A2)
?

thanks in advance !

Nader





All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com