English 中文(简体)
使用Excel文档进行平级/治疗。 NET
原标题:Excel file parsing/scraping using .NET

前几位专家正在试图编造一个外壳。 其结构非常复杂。 人们知道的可能方式。

  • Use Office introp libraries
  • Use OLEDB provider and read excel file in a dataset.

但是,这个问题很复杂,如一些栏目、小数或小数等。

这样做的最佳途径是什么?

预先感谢。

最佳回答
问题回答

我本人更喜欢使用最经常的比照灯光灯光灯光灯光灯,或者说,你可以使用已经投入时间/精力的第三方图书馆获取数据。

为此,综合图书馆拥有一个极佳的图书馆。

我的用户首先将Excel电子表格作为CSV文档。 然后,他们把CSV档案上载到我的手上。 这使得使之更加简单。

它与你一样,对目前的任务有很好的了解。 你们不得不书写商业逻辑,以打破电子表格格式的复杂性,并提取你重新研究的数据。

在我看来,VTSO/Interop是最佳平台战略,原因有二:

  1. Access to the spreadsheet data will be a small part of the effort needed for your solution. So if using OLEDB saves a little time in data access, it will probably be irrelevant in terms of the overall project scope.
  2. You may need to examine the contents of individual cells closely and take context information like formatting into account. With interop, you get full visibility of cell contents, context, and other sheet level context information like named ranges and lists. It is a risk to assume you won t need this type of information while decoding the spreadsheet.




相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签