更新时间:2023-02-13 17:33:43
是的,这是可能的。基本上,您可以将excel文件视为数据库。使用 OLE DB [ ^ ],您可以像处理数据库一样操作excel文件中的数据。
现在有关示例,请参阅以下内容。
使用C#将Excel文件读入ASP.NET中的DataSet [ ^ ]
如何使用C#中的连接字符串阅读Microsoft Excel 2007 [ ^ ]
Hi to all ..
I am a non-expert programmer type but I am developing Desktop Applications. I just wanna ask if is it possible to get the data of each cell in MS Excel using C# codes?
Yes it is possible. Basically, you can treat the excel file like a database. Using OLE DB[^], you can manipulate the data in your excel file as if you were doing it against a database.
Now for the examples, see the following.
Read Excel File into DataSet in ASP.NET Using C#[^]
How to Read Microsoft Excel 2007 Using a Connection String in C#[^]