M
M
metallix2015-09-14 21:46:18
HTML
metallix, 2015-09-14 21:46:18

Is there a free solution for exporting MS Excel to HTML tables in C#?

Good day.
On the project (I am writing on ASP.NET MVC) I am developing a reporting module with saving to MS Excel file. After creating the document, it should be possible to preview, the best option is to export the document to an HTML table, and display it in the right place. In order not to write bicycles, I decided to look for a ready-made solution, I found the Spire.XLS for .NET library, which is completely satisfied. But, unfortunately, it is paid, and in the free version, a line is added to the html file saying that the free version is used. So, the question is, are there any free solutions for exporting Excel to HTML? Or can I just erase this inscription and no one will know, and work quietly on?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
AxisPod, 2015-09-15
@AxisPod

Search for the line "Interop Excel C#", here's some useful stuff:
https://msdn.microsoft.com/en-us/library/microsoft... actually from MS
wladm.narod.ru/C_Sharp/comexcel.html an old tutorial, but I think
www.codeproject.com/Articles/9992/Faster-MS-Excel-... is enough for you , or very close, it remains to generate html.

S
Stanislav Makarov, 2015-09-15
@Nipheris

Some hard advice has been given here. If you don't need fancy formatting, take EPPlus and read the Excel file. Everything that you read - render in html yourself. And ideally, it is better to make two output converters for the report - one that saves to Excel, and the other to HTML, so as not to play a broken phone.
There is no need to decompile and overwrite anything, if the library is paid, there are reasons for that, as long as everyone does this, no one will treat business from Russia as adequate.

D
Dmitry Kovalsky, 2015-09-14
@dmitryKovalskiy

If you have an installed office, you can try to connect the Excel COM object.
This solution was found by a superficial search.

V
Viktor Buzin, 2015-09-15
@Buzzz

Well, if you decompile the assembly, then you can try to remove it and it will be a real quest. For free solutions for working with office docks, I always used the OpenXML SDK hardcore but lightweight and right on target, then you write your own Spire.XLS to HTML. all of these builds mostly use the OpenXML SDK. Something like this.

V
Vitaly Litvinyuk, 2015-09-15
@Dzhamal

You can connect Office 365 and use it to preview generated reports. I can’t say if it will be paid or not, but if my memory serves me, it is free up to a certain threshold of use. Perhaps it will be enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question