I'm working with SL 5.0 and realized that I need to work with Excel library from Office. The application purpose is intended for many computers where can have or can't have Office installed.

I'm worry about how can I deal with this situation. Locally I referenced a Interop library for testing, but when I deploy the project, I can imagine that it wouln't work on every computer, right?


SpreadsheetGear for Silverlight is an Excel compatible spreadsheet control for Silverlight which can read, write, display, edit, calculate, chart, print, etc... Excel workbooks.

You can see live SpreadsheetGear for Silverlight samples here or download the free evaluation to try it yourself here.

Disclaimer: I own SpreadsheetGear LLC


It is possible to save Excel files as XML and then it is very simple to import them. http://www.c-sharpcorner.com/uploadfile/mgold/importing-an-excel-file-into-a-silverlight-datagrid-in-xml-format/


(Only a XLSX) http://www.silverlightshow.net/items/An-Excel-file-Viewer-in-Silverlight-4.aspx


The interop library just is just a wrapper that calls the Office COM objects, which a user won't have if they don't have Office installed. So your application will only work on computers that have Office already installed.


You want something like this project on CodePlex


It looks like it will work without having to have Excel installed, but it does appear only to manipulate up to Excel 2003 files, so if you're generating Excel 2007 or later files this might not be the solution for you.

I have nothing to do with this particular library.

There are probably plenty of other libraries around that do a similar job. You'll just need to do a bit of searching and verifying that they do the job you want them to.


You might want to try http://excellite.codeplex.com/ (if you are supporting older formats) or http://silverlightexcel.codeplex.com/ if you are using the newer formats.

You are right, if the client won't necessarily have the excel com objects, your interop calls will fail. You'll most likely need to use a client library that can manage the format (like the 2 mentioned - there are also 3rd party libraries which can get expensive). The other fallback is to do csv or txt.

If the client machine doesn't have Excel ... what is the user experience going to be like?


Yes it will not work, you need to manually register all com dll's related to excel.
