问题描述
我想使用 Open XML SDK 2.0 (CTP) 更新图表使用的电子表格中的单元格.我发现的所有代码示例都插入了新的单元格.我正在努力检索正确的工作表.
I want to update a cell in a spreadsheet that is used by a chart, using the Open XML SDK 2.0 (CTP). All the code samples I have found insert new cells. I am struggling with retrieving the right worksheet.
当我在 Visual Studio 中导航树时,我看到了三张工作表,但没有一张有任何子级.我错过了什么?
When I navigate the tree in Visual Studio, I am seeing three sheets, but none of them has any children. What am I missing?
推荐答案
这里是工作代码.这是一个原型.对于大量更改,可能只打开一次文档.此外,还有一些硬编码的东西,如工作表名称和单元格类型,必须先进行参数化,然后才能称为生产就绪.http://openxmldeveloper.org/forums/4005/ShowThread.aspx 非常有帮助.
Here is the working code. This is a prototype. For a larger number of changes, one might open the document only once. Also, there are some hard-coded things like sheet name and cell type that would have to be parameterized before this can be called production-ready. http://openxmldeveloper.org/forums/4005/ShowThread.aspx was very helpful.
这篇关于Open XML SDK 2.0 - 如何更新电子表格中的单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!