是否可以使用办公室加载项复制excel公式? [英] Is it possible to copy excel formula using an office add-in?

查看:121
本文介绍了是否可以使用办公室加载项复制excel公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设法使用Visual Studio Pro 2013为Excel 2013创建了一个功能齐全的任务窗格加载项,我有一堆测试函数,这些函数都可以很好地工作,比如添加数据,创建绑定,创建表等。我想在Excel中做一些非常简单的事情,在新列中添加,然后将列左侧的列复制到新列中。在excel中,这将复制所有公式,并且任何关系的单元格公式引用都会很好地转置到新列。 (例如,A1可能会变成= B1)
有没有办法用javascript做到这一点?我能想到的唯一选择是在新列中添加一个空白列,并在javascript中从头开始重建所有信息和公式,然后添加格式,这对于Excel做得很好的东西来说是一个非常冗长的选择简单的复制和粘贴(特殊)
谢谢
Stu

I have managed to create a fully functioning task pane add-in for Excel 2013 using Visual Studio Pro 2013 and I have a bunch of test functions that all work nicely, like adding in data, creating bindings, creating tables etc. Now I want to do something that is very simple in Excel, which is add in a new column, then copy the column to the left of it into the new column. In excel this would copy all of the formula and any cell formulas references that are relational would transpose nicely to the new column. (E.g =A1 might become =B1) Is there any way of doing this using javascript? The only alternative I can think of is to add in the new column as a blank column and the rebuild all the information and formulas from scratch in javascript, then add the formatting, which is an extremely long winded alternative for something that Excel does so well with a simple copy and paste (special) thanks Stu

推荐答案

感谢您在此处发布您的问题。不幸的是,还没有复制和特殊粘贴。但是我们知道这个API的重要性,我们正在研究它。我担心在我们研究这个问题时,您将不得不使用JavaScript重建该列。但请确保查看dev.office.com和Office开发人员博客,因为我们正在积极地为Excel添加更多API。

Thanks for posting your question here. Unfortunately, copy and special paste is not available yet. But we are aware of the importance of this API and we are investigating into it. I am afraid while we are looking into this, you will have to rebuild the column with JavaScript. But make sure check out dev.office.com and office developer blogs as we are actively working on adding more APIs to Excel.

如果您有任何其他API请求,可以在officespdev.uservoice.com上提交。

If you have any other API requests, you can submit them on officespdev.uservoice.com.

谢谢,
Sky

Thanks, Sky

这篇关于是否可以使用办公室加载项复制excel公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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