Excel数据连接的相对文件路径 [英] Relative file paths for Excel Data Connections

查看:478
本文介绍了Excel数据连接的相对文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有7个csv文件和一个xls文件。在xls文件中,我有7张(每个csv文件一个)。我可以创建一个数据连接,将读取每个csv文件到给定的工作表。但是,当我压缩xls和7 csv文件,并发送给他们无法打开的人看到xls文件中的数据,因为它正试图访问我的计算机上的文件(C:/ Desktop / MyComputerName / file.csv)。是否可以使此链接相对?有没有不同的方式访问csv文件的内容,而不是逐个单元格?

I have 7 csv files and one xls file. In the xls file I have 7 sheets (one for each csv file). I can create a data connection that will read each csv file into a given sheet. However, when I zip up the xls, and 7 csv files and send them to someone they are not able to open see the data in the xls file becuase it is trying to access the files on my computer (C:/Desktop/MyComputerName/file.csv). Is it possible to make this link relative? Is there a different way to access the csv file's content without doing it cell by cell?

推荐答案

根据进一步的研究,而无需使用工作簿路径编写VBA /宏脚本。

According to further research it's not possible without writing a VBA/macro script using the workbook path.

这篇关于Excel数据连接的相对文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆