user8591026
user8591026

Reputation:

Worksheet to .net Dataset

I am very much a novice when it comes to C#, but I am trying to get Worksheets from an Excel Spreadsheet into a dataset using Visual Studios. I have a DLL called InfExcelExtension for which i've screenshot here. I just need a good start off position really as I don't know which Visual Studio Project to use initially, and roughly where to go from there?

enter image description here1

enter image description here

Upvotes: 0

Views: 52

Answers (1)

GPW
GPW

Reputation: 2626

I'm not familiar with InfExcelExtension. A quick google doesn't seem to turn much up, so unless you're reliant on this for some reason I'd probably just use something else.

In terms of what sort of project to use, if you only need this to run on standard windows machines then I'd suggest a .Net Framework class library. This will produce a DLL you can use in a variety of apps. You can then produce a command line app (console app) or a winforms app (graphical windows app) which uses this - or both...

If the computer on which your program will run HAS excel installed, you can use Interop functionality, see here: https://coderwall.com/p/app3ya/read-excel-file-in-c

note: this basically loads Excel in a process in the background and allows you to interact with it, hence you need excel.

Alternatively, you can use OLE stuff as detailed here: Reading Excel files from C#

Upvotes: 1

Related Questions