DocumentFormat缺少参考 [英] DocumentFormat missing reference

查看:96
本文介绍了DocumentFormat缺少参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试将Excel电子表格导入二维数组,但不确定是否有一种方法可以对此进行硬编码,因为我不确定Excel如何定界其值.

我已经看到它建议可以在以下范围内使用Spreadsheet类:
使用DocumentFormat.OpenXML
但我不确定要使用此程序集需要添加什么参考.

任何人都可以提供参考帮助,或者有人可以更轻松地将Excel电子表格存储为2D数组吗?

我仍处于学习使用C#的早期阶段,因此非常感谢您的帮助.我正在使用Visual Studio2010.

谢谢,
Stephen.

Hi All,

I''m trying to import an Excel spreadsheet into a 2 dimensional array but am not sure whether there is a way to hardcode this as I''m not sure how Excel delimits its values.

I''ve seen it suggested that the Spreadsheet class can be used within:
using DocumentFormat.OpenXML
but I''m not sure what reference I need to add to use this assembly.

Can anyone help with the reference or does anyone have any easier way to store an Excel spreadsheet as a 2D array?

I''m still in the early stages of learning to use C# so any help is very much appreciated. I''m using Visual Studio 2010.

Thanks,
Stephen.

推荐答案

如有疑问,请尝试使用google.快速搜索"DocumentFormat.OpenXML"给了我MSDN DocumentFormat.OpenXml命名空间 [^ ]信息.从中查看随机属性: OfficeAvailabilityAttribute类 [ ^ ]为您提供信息:
If in doubt, try google. A quick search for "DocumentFormat.OpenXML" gave me the MSDN DocumentFormat.OpenXml namespace[^] information. Looking at a random property from that: OfficeAvailabilityAttribute class[^] gives you the info:
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Hi Originalgriff,

非常感谢您提供此信息.当我尝试添加参考时,我只是在查找该参考时遇到了问题.有谁知道它应该放在特定位置还是.dll文件是否链接到特定程序?这是否在我可能尚未下载的特定程序中?

谢谢,
斯蒂芬.
Hi Originalgriff,

Thanks very much for this information. I''m just having a problem with locating that reference when I try to add it. Does anyone know if it should be in a particular place or if the .dll file is linked to a particular program? Is this within a particular program I may not yet have downloaded?

Thanks,
Stephen.


这篇关于DocumentFormat缺少参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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