create xls with c# asp.net - c#

Is there any free library for create xls files in asp.net on a server without office?
thanks

See this codeproject solution:
http://www.codeproject.com/KB/office/biffcsharp.aspx

You could also use SpreadsheetML. It is just xml so you could generate it by printing text to a file.

OfficeWriter is another third party tool that can be used for this purpose:
http://www.officewriter.com/trial
It's an API that generates/manipulates XLS/XLSX on a server without office.

It's not free but we use the Aspose Cells tool which is excellent

Related

How to export Sql Server Data to Excel File in C#

How can one read sql server data and write it to excel file in C#?
Do I need to use an external .Net library, or is it just OK using Visual Studio itself?
Any example and link will be well appreciated..
Note: Please send examples for Winforms, not asp.net
I would use some kind of OR-Mapper to read data from SQL such as
NHibernate
Entity Framework
Linq 2 SQL
For writing data to Excel you could bind hardly to any Excel Version by referencing the Excel Assemblies. The cleaner and more beautiful way is to use Open XML SDK for Office http://www.microsoft.com/download/en/details.aspx?id=5124
Follow the below article, this even provide the facility to export the data into many formats.
Export data to Excel and other formats using C#
see:
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/exportxl_asp2_dc11032006003657AM/exportxl_asp2_dc.aspx
http://geekswithblogs.net/VROD/archive/2008/04/20/121433.aspx
You could find helpful information how to achieve that goal in the following blog posts:
1. http://msmvps.com/blogs/deborahk/archive/2009/07/23/writing-data-from-a-datatable-to-excel.aspx
2. http://tim.mackey.ie/HowtoExportADatasetToExcelCAspnet.aspx
See : http://www.dotnetfunda.com/forums/thread548-export-data-to-excel-file-from-a-table-in-sql-server-using-csharp.aspx
It also has a nice example on the link inside the page.

generate excel with chart from .NET

I have a WPF application and I need to generate an excel file that also contains charts? What is the best way of doing that? If possible, I want to avoid using the excel interop.
Thx,
L
Look at this http://epplus.codeplex.com/wikipage?title=StatisticsSheetExample
I just found http://epplus.codeplex.com. Think I'm going to give it a try, it supports charts.
OfficeWriter is another mature .NET library for Excel that supports adding charts:
http://www.officewriter.com

read .xlsx without Excel and OLEDB

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.
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.
I decided to use the the Excel Data Reader on CodePlex.
Koogra can read .xlsx files.
Have a look at excellibrary. For now it supports only xls, but xlsx support is planned for the future.
This question looks to be similar to this one no?
Have you checked NPOI ?
Best
We use NPOI successfully in our projects.
There might be some 3rd party components that can help you.
Here's one
Here's another
NPOI's latest version support both xsl and xslx. Download it from
NPOI 2.0
and use NPOI.XSSF.UserModel.XSSFWorkbook fro xlsx.

How to read a word 2003 document without COM in csharp?

Hey all, I need to read many word docs in server.
But you know,the component in .net is based on COM,it would work reliably if I use it.
It is so sick.You know, in word 2007,because of the xml file,there are many ways to read.
I wanna find a open source way to read word 2003,Thanks.
I'd suggest that you use the NPOI library to read .doc files: http://npoi.codeplex.com/
The library is the .NET version of the POI Java project and licensed under the Apache License.

Reading and parsing Excel files in C#

What is the best way/library to read Excel 2003 and 2007 files using C#? I need to do some heavy parsing.
Do you need to parse the file, or deal with the contents?
For parsing the file, you'd better hope it's in Open Office XML format, because the previous binary version is not documented at all.
If you just need to deal with the contents, use the Office Interop libraries.
You can try SmartXLS for .Net,it support most features of excel(cell formatting,Charts,formulas,pivot tables etc),and can read/write both the excel97-2003 xls format and the excel2007 openxml format.
I would start by trying to use ADO.NET.
If that doesn't work, I used xlsio by Syncfusion.
If the data is in some kind of table format I'd suggest to try using OleDbConnection and treating the Excel sheet as another data connection. Otherwise Interop is ok if it's not on a server or anything like that.
You can use the MS Office interop assemblies (see here) to access Excel files from .NET applications.
There are a number of 3rd party tools you can use. I would avoid using the Interop libraries as they can be pretty slow. I have used Aspose.Cells before and it works pretty well. It does cost some money though.

Categories

Resources