如何使用OpenXML格式SDK从电子表格中读取数据? [英] How do I read data from a spreadsheet using the OpenXML Format SDK?

查看:184
本文介绍了如何使用OpenXML格式SDK从电子表格中读取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Open XML SDK 2.0从Excel 2007工作簿中的单个工作表中读取数据。我花了很多时间寻找基本的指导方针,但我只是在创建电子表格方面找到帮助。

I need to read data from a single worksheet in an Excel 2007 workbook using the Open XML SDK 2.0. I have spent a lot of time searching for basic guidelines to doing this, but I have only found help on creating spreadsheets.

如何在工作表中迭代行,然后使用此SDK迭代每行中的单元格?

How do I iterate rows in a worksheet and then iterate the cells in each row, using this SDK?

推荐答案

我这样做的方式是与Linq。使用SDK,只需使用纯Open XML(无SDK)就可以在此主题中找到很多示例。看看:

The way I do this is with Linq. There are lots of sample around on this subject from using the SDK to just going with pure Open XML (no SDK). Take a look at:

这篇关于如何使用OpenXML格式SDK从电子表格中读取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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