跳到主要內容

如何在未打開/關閉的Excel工作簿文件中引用或鏈接值?

通常,在引用其他工作簿中的單元格值時,需要首先打開該工作簿。 如何直接從封閉的工作簿中引用單元格值? 本文將向您展示未打開的工作簿文件的某個工作表中引用單元格值的方法。

具有公式的未打開/關閉的Excel文件的參考值
使用Kutools for Excel從未打開/關閉的Excel文件中插入某個工作表的所有數據


具有公式的未打開/關閉的Excel文件的參考值

假設名為test的已關閉工作簿位於計算機的路徑E:\ Excel file \中,並且您要引用此已關閉工作簿的Sheet2中單元格A2的值。 請執行以下操作。

1.選擇一個空白單元格以放置引用的單元格值,在“公式欄”中輸入公式,然後按 Enter 鍵。 看截圖:

=INDEX('E:\Excel file\[test.xlsx]Sheet2'!A:A,2,1)

筆記:

1)。 在公式, E:\ Excel文件\ 是未打開的工作簿的完整文件路徑, 測試.xlsx 是工作簿的名稱,Sheet2是工作表名稱,其中包含您需要引用的單元格值,而A:A,2,1表示將在關閉的工作簿中引用單元格A2。 您可以根據需要進行更改。
2)。 如果要手動選擇要參考的工作表,請應用以下公式。 應用公式後, 選擇工作表 彈出對話框,請選擇一個工作表,然後單擊“確定”按鈕。 然後,將立即引用此工作表的某些單元格值。

=INDEX('E:\Excel file\[test.xlsx]sheetname'!A:A,2,1)


使用Kutools for Excel從未打開/關閉的Excel文件中插入某個工作表的所有數據

如果您想從一個封閉的Excel文件中插入整個工作表內容,在這裡我建議您 在光標處插入文件 的效用 Excel的Kutools。 請按照以下步驟完成操作。

申請前 Excel的Kutools首先下載並安裝.

1.選擇您要引用的工作表開始的空白單元格,然後單擊 Kutools 加 > 進出口 > 在光標處插入文件

2。 在裡面 在光標處插入文件 對話框中,單擊 瀏覽 按鈕。

3。 在裡面 選擇要插入單元格光標位置的文件 對話框中,找到並選擇要引用的已關閉工作簿,然後按 已提交 按鈕。 看截圖:

4.現在返回到插入 光標處的文件 對話框中,您可以選中 僅值(無公式)不傳輸格式 選項,然後單擊 OK 按鈕。 在下一個彈出 選擇一個工作表 對話框中,指定一個工作表,然後單擊 OK 按鈕。 看截圖:

現在,在當前工作表中引用了指定的未打開工作簿的選定工作表中的全部內容。

備註:除了引用未打開的工作簿中的值外,您還可以使用此實用工具來引用未打開的Txt或CSV文件中的值。

  如果您想免費試用(30天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。


相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The Kutools solution to this is useless. It inserts the entire file and not a range or specific cells. What a waste. If Kutools wanted to make a useful tool, they could write something to overcome the Index(Indirect limitation, allowing for dynamic content sourcing without writing VBA
This comment was minimized by the moderator on the site
Hi CJ,
Thank you for your advice.
This comment was minimized by the moderator on the site
I have a worksheet for logging shipments. I want to retrieve the freight costs captured on shipping documents in different workbooks without VBA, whether the workbooks are opened or closed, and have the results returned to my shipping log per the respective shipment. I've manually typed the following path using the "Index" function and it works.

Ex #1: =IF(AND($G5>0,$I5>0,INDEX('V:\Operations\Shipping Log\Argentina\CY 2018\[AR18001_Order# 123456_Customer Name.xlsx]Shipping Document'!$AA:$AA,2,1),0)

The challenge I have is the country, calendar year, log number, order number and customer name are subject to change per shipment. To account for this I used the "Concatenate" function to build the path and replace the manually input information referenced above based on certain fields the user populates in the Shipping Log. First, I tested the "Concatenate" function to build the path and it worked for the consecutive rows. Next, I combined the "Concatenate" function with the "Index" function (to access the closed workbook) and received the text result of the path instead of the value of the desired cell. What am I missing?


Ex #2:=IF(AND($G5>0,$I5>0,INDEX(CONCATENATE("'V:\Operations\Shipping Log\",$C5,"\","CY 20",SUM($JK$2:$NG$2),"\","[",$D5,"_",$I5,"_",$G5,".xlsx]Shipping Document'!$AA:AA,2,1),0)"),"")

$C5 retrieves the country

$JK$2:$NG$2 retrieves the suffix of the calendar year

$D5 retrieves the shipping log number

$I5 retrieves the order number

$G5 retrieves the customer name

AA2 houses the desired value


I also tried "VLOOKUP" function instead of "Index" but received a "#VALUE!" error message.


Ex #3: =IF(AND($G5>0,$I5>0,VLOOKUP("Freight",(CONCATENATE("'V:\Operations\Shipping Log\",$C5,"\","CY 20",SUM($JK$2:$NG$2),"\","[",$D5,"_",$I5,"_",$G5,".xlsx]Shipping Document'!$AA:$AA"),2,FALSE),"")
This comment was minimized by the moderator on the site
Gray, I think I found a solution for you. Please contact me if you are still looking: dons(at )premierconstructionspreadsheets(dot )com
This comment was minimized by the moderator on the site
Same thing happened to me. Exactly the same. Did you find a solution?
This comment was minimized by the moderator on the site
Same thing happened to me. Exactly the same. Did you find a solution?
This comment was minimized by the moderator on the site
Dear Gray,
Do you mind uploading your related workbooks?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations