9

Is there any chance to read .xlsx files in C# without having Excel installed on the client, and with no OLEDB connection available?

The application is a Winforms project written in VS2005 C# .NET Framework 2.0.

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Sunlog
  • 269
  • 1
  • 3
  • 13
  • What does "read" actually mean? What are you trying to do with the file? Extract data? Read document properties? Any modifications? Display or print? – Dirk Vollmar Nov 05 '10 at 13:13

8 Answers8

4

How about this one here:

EPPlus-Create advanced Excel 2007 spreadsheets on the server

EPPlus is a .net library that reads and writes Excel 2007 files using the Open Office Xml format (xlsx). EPPlus supports ranges, cell styling, charts, pictures, shapes, named ranges, autofilters and a lot of other stuff.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
3

I decided to use the the Excel Data Reader on CodePlex.

Kev
  • 118,037
  • 53
  • 300
  • 385
Sunlog
  • 269
  • 1
  • 3
  • 13
2

Koogra can read .xlsx files.

stuartd
  • 70,509
  • 14
  • 132
  • 163
  • I did a lot of searching for similar and I found Koogra to be the most reliable, free solution that handles .xls and .xlsx and doesn't require any install/dependencies. – hross Jun 28 '12 at 17:58
0

NPOI's latest version support both xsl and xslx. Download it from

NPOI 2.0 and use NPOI.XSSF.UserModel.XSSFWorkbook fro xlsx.

whitestream
  • 691
  • 1
  • 7
  • 14
0

Have a look at excellibrary. For now it supports only xls, but xlsx support is planned for the future.

Adrian Fâciu
  • 12,414
  • 3
  • 53
  • 68
0

This question looks to be similar to this one no?

Have you checked NPOI ?

Best

Community
  • 1
  • 1
Vagaus
  • 4,174
  • 20
  • 31
  • 1
    http://npoi.codeplex.com/workitem/6108 - this is the bug tracker item for XLSX support in NPOI. No support for the format requested would make it a non-starter. – 48klocs Nov 05 '10 at 13:37
0

We use NPOI successfully in our projects.

Bas Danen
  • 311
  • 1
  • 10
0

There might be some 3rd party components that can help you.

Here's one

Here's another

rgunawan
  • 314
  • 1
  • 6