如何阻止Excel存储XLA的绝对路径? [英] How to stop Excel storing the absolute path to an XLA?

查看:464
本文介绍了如何阻止Excel存储XLA的绝对路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XLA文件要作为Excel加载项部署到组织中的多个用户。我的目的是将其部署到Application Data\MyCompany中用户的文档和设置文件夹中的目录中。 (实际上,这一切都是通过一个包装器工作的,它可以在本地复制最新版本的XLA,并将其安装为Excel加载项)。

I have an XLA file that is to be deployed to a number of users in the organisation as an Excel add-in. My intention is to deploy it to a directory in the user's "documents and settings" folder in "Application Data\MyCompany". (In fact this is all working through a wrapper that copies the latest version of the XLA locally and installs it as an Excel add-in).

但是,如果用户创建一个引用此XLA中定义的函数的工作表,然后Excel似乎将XLA的绝对路径存储在函数调用中。因此,如果用户将表单发送给同事,Excel无法解析该功能,因为它们的XLA副本位于不同的绝对路径(因为用户名是绝对路径的一部分)。

However, if a user creates a sheet that references a function defined in this XLA then Excel appears to store the absolute path of the XLA in the function call. Thus, if the user sends the sheet to a colleague Excel fails to resolve the function as their copy of the XLA resides at a different absolute path (as their username is part of the absolute path).

到目前为止,我的看法是Excel刚刚处理,只要XLA作为加载项安装,但似乎并非如此。

My belief up until now was the Excel "just coped" with this as long as the XLA was installed as an add-in but this does not appear to be the case.

是否真的需要为所有用户为我的加载项执行相同的绝对路径?这是可能在一个单一的组织,但我真的不能相信这是真的,因为它严重阻碍XLS文件的共享。

Is it really the case that I need to enforce an identical absolute path for my add-in for all users? This is possible within a single organisation but I honestly can't believe this is true as it seriously impedes sharing of XLS files.

谢谢。

推荐答案

没有好办法做到这一点。我将我的xla文件放在网络共享上而不是本地,并通过UNC路径进行安装。这只适用于我,因为每个人都可以访问分享,这可能不是你的情况。这里有一些其他的选择

There's no good way to do this. I put my xla files on a network share rather than locally and install them via the UNC path. That only works for me because everyone has access to the share, which may not be the case for you. Here's some other alternatives

http://www.dailydoseofexcel.com/archives/2008/06/02/fixing-links-to-udfs-in-addins/

这篇关于如何阻止Excel存储XLA的绝对路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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