This forum is in permanent archive mode. Our new active community can be found here.

.NET C# word and excel file creation

edited June 2008 in Everything Else
I'm currently in a development team and one of the projects I'm involved with is a reporting engine written in C# in the .NET framework. My current task is to evaluate some modules to write data into excel spreadsheets and word documents. While it is possible to do this with the Object Libraries of the respective applications, they also require the use of COM and my boss wants to have a few alternatives represented to him.

I'm currently looking into a few modules, but I wanted to ask if anybody here had experience with these tasks and perhaps a recommendation.

Comments

  • Could you be a little bit more verbose of what you want to do?
  • The party requesting the software has a large pool of data stored in a database. They want to create reports from it in Excel spreadsheets or word documents. Currently Crystal Reports is in use for that but it is supposed to be replaced with the software we are writing.

    They are going to give as a few templates of how the reports are supposed to look like. We are going to replicate them and have reports generated that look the same filled with data from the database.

    What we need is a software module that we can tell "We want this data to be written in an excel spreadsheet/word document in this format".
    The module should not use Component Object Module. It should be written in C# and be useable under the .NET framework.
    A list of examples. I'm currently trying to evaluate a few of these.
  • CurrentlyCrystal Reportsis in use for that but it is supposed to be replaced with the software we are writing.
    Crystal Reports is fairly industry-standard. As much as I hate to say it, you would probably be better-off keeping it, as it's well-understood and well-supported. You're basically re-inventing the wheel.
  • I pretty much agree with you Rym, but the client wants a new software because Crystal reports is supposedly difficult to use and slow. Another large reasons that the formulas that will be used in the reports are going to be stored separately and shared with other applications.
  • I suggest you look into using Visual Studio Tools for Office which allow you to access the Office applications under the .NET framework. Unlike the individual Object Models, VSTO provides a Visual Studio add-in as well as a runtime which allows you to communicate with Office using .NET.
  • edited June 2008
    Unfortunately the application should be not be reliant of Office, so VSTO is not an option. Had to check that with my boss.
    Post edited by chaosof99 on
  • If you only want to write flat data into the Excel files, just make comma separate values files instead. You can create them with simple text output, and Excel can read them. Then if users want them to be xls, they can save as xls. The same goes with word and txt or rtf files. If you want the files to have fancy fonts, colors, charts, etc. then you're going to need some Microsoft magic.
  • Another option you might want to look at is messing with OOXML development using WordProcessingML and SpreadsheetML. I haven't really messed with them much, so I don't really know the capabilities, but it's something you might want to look into.
Sign In or Register to comment.