如何在 Excel 2007 中禁用 MS 查询使用引号自动换行列别名?

发布于 2024-07-10 14:49:16 字数 284 浏览 7 评论 0原文

我正在制作一个通过 MS Query 访问旧数据源的工作表。 我试图为一些丑陋的列名添加别名,但数据源不支持用引号引起来的别名。 由于 Excel 自动将别名括在引号中,因此查询错误/失败。 我似乎被困住了。

如何停止这种默认行为?

在这种情况下我宁愿不使用 VBA。 我真的只是想弄清楚是否可以让 MS Query 为这些列添加别名,而无需将它们用单引号引起来。

我发现一些文章谈论注册表项/修补程序。 但它们都引用了早期版本的 Excel,并且 07 的注册表项不存在。

I'm working on a sheet that accesses a legacy data source via MS Query. I'm trying to alias some of the ridiculously ugly column names but the data source doesn't support wrapping alias names with quotes. Since excel is automatically wrapping aliases in quotes the query errors/fails. I seem to be stuck.

How do I stop this default behavior?

I'd rather not use VBA for this case. I'm really just trying to figure out if I can get MS Query to alias these columns without wrapping them in single quotes.

I found some articles talking about registry entries/hot fixes. But they all refer to earlier versions of excel and the reg entries don't exist for 07.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡的优雅 2024-07-17 14:49:16

我找到了解决方法。

如果我直接从连接属性编辑 SQL -> 定义选项卡(而不是来自 MS Query 内)生成的查询不会有自动包装的别名。

可以使用的小盒子,但没有什么复制粘贴解决不了的:)

I found a work around.

If I edit the SQL directly from the Connection Properties -> Definition tab (And not from within MS Query) the resulting query won't have auto wrapped aliases.

Small box to work with, but nothing copy paste won't solve :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文