连接文件路径Excel

时间:2016-06-01 15:32:46

标签: excel

假设我的列上有日期。 文件路径是这样的:

=' U:\ Report \ [Date 042516.xls] Joe Smoe'!$ C81

' 042516'每列都是可变的。 !$ C81对原始文档中的每一行都是可变的。

如何执行此操作并从报告和日期中提取相应的数字?

1 个答案:

答案 0 :(得分:1)

我想我明白了 - 所以你有一个带有数字的列(042517042518042516等),你希望公式更新路径的那一部分,当你向下拖动?

如果C1位于=INDIRECT("'U:\Report\[Date "&C1&".xls]Joe Smoe'!$C81"),您可以使用此功能:

Date 042516.xls
(请注意,正在引用的工作簿from tkinter.filedialog import askopenfilename ## OR from tkinter.filedialog import * from tkinter import * root = Tk() foo = askopenfilename() root.destroy() print(foo) 必须打开才能使间接工作。)