0

I need to create and populate excel file in c#. With Microsoft.Office.Interop.Excel , it can be created easily but it need to install Office on server. I am looking for solution without Office installation and without any third party components.

asked Mar 2, 2011 at 15:44
2
  • 1
    Does the file have to be an Excel file or just readable by Excel? If it's the latter then you could just write an xml file or csv file. Commented Mar 2, 2011 at 15:47
  • I'd just use Aspose.Cells. Your requirement that there should be no third party components seems rather constraining. Commented Mar 2, 2011 at 16:06

3 Answers 3

1

It depends, if you just need to create an export that your user need to be able to open with Excel, then you might think of creating a CSV export.

Otherwise you may consider NPOI. I know it's a third-party lib, but it's open source :)

answered Mar 2, 2011 at 15:48

Comments

1

At my previous company, we created a "template" excel workbook (docx) and used the System.IO.Packaging classes to open it in code, and replace the contents of the cells.

This also had the advantage of allowing us to style the spreadsheet up in Excel (in the template) to give a much prettier report!

answered Mar 2, 2011 at 18:02

Comments

0

You could just use the OpenOffice API, which is free. It will have basically the same functionality as Office and the spreadsheets created with it are compatible with Excel. OpenOffice API Wiki

answered Mar 2, 2011 at 15:57

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.