从C ++应用程序评估excel公式? [英] evaluate excel formula from C++ app?

查看:100
本文介绍了从C ++应用程序评估excel公式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++应用程序,可以与包含一些公式的XLS文件进行交互.为了从该XLS检索固定的单元格数据,我使用了运行良好的ExcelFormat库.现在,我需要获取通过公式设置的单元格的值.

该lib不处理公式求值功能.另一种方法是使用EXCEL 2010的COM API,但我不知道:

1.是否可以通过COM调用来实现?
2.我需要调用哪种方法?

谢谢.

I have a C++ application that interacts with an XLS file which contains some formulas. To retrieve fixed cell data from that XLS, I use the ExcelFormat lib which works fine. Now I need to get the values of cells which are set via a formula.

That lib doesn''t handle the formula evaluation function. Another way would be to use the COM API of EXCEL 2010 but I dont know:

1. if it is possible to do so via a COM call?
2. which methode do I need to call?

thanks.

推荐答案

请参见此MSDN上的文章 [ ^ ] .如果您不熟悉COM,那么使用C ++进行办公自动化并不是世界上最简单的事情,但是可以做到.
See this article[^] on MSDN. Office automation from C++ is not the easiest thing in the world if you are not comfortable with COM, but it can be done.


这篇关于从C ++应用程序评估excel公式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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