tags:

views:

49

answers:

2

I've accessed excel files using desktop applications using OleDbReader, interop, and the latest (and my fav), ling-to-sql. However, this time I need to do so from a Web application using asp.net with C# code behind.

I don't need to create excel files, only read them. Is it possible to do this with a .xls(x), or should I be shooting for .csv?

+1  A: 

I'd recommend going with CSV. We have a lot of difficulty working with xls files on web servers. Mainly because of Microsoft's restrictive licensing. You'd have to have an Excel license for everyone who'd be accessing the file.. well maybe. That's how it is for us anyway. It might be different under other circumstances. Anyhow, it's not really practical.

DaveDev
+2  A: 

Looks like they have lots of different solutions posted here: http://stackoverflow.com/questions/15828/reading-excel-files-from-c

Looks like a combination of people recommending ADO.NET as long as the Excel file is pretty straightforward (since there might be "quirks" depending on what type of data you are storing) or different 3rd party tools.

keith_c
@keith_c - Is that not for desktop applications running C#? I'm looking to handle files in asp.net with C# code behind.
cinqoTimo
Are these excel files already uploaded to the server where your web app resides?
keith_c