Click here to Skip to main content
11,929,232 members (57,364 online)
Rate this:
Please Sign up or sign in to vote.
Hello every1

i have an excel file and i want to export it to html as per our client requirement. how can i do it without using office interop.

thank you in advance.
Posted 20-Dec-12 8:00am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

There are .net libabries (even free) out there (google will help) that can read xls and/or xlsx.
For example this one:[^], that can read borth, but no formatting as I see.

Choosing the right one depends on how exactly this export should be performed (only content matters, or you need to follow exact styling), and what exactly this excel file contains (only data and formulas, or are there any external references, or are there even embedded objects).

I think if you have embedded objects, you will not be able not avoid using Excel or some other excel-compatible spreadsheet editor interop - or you will have to code a lot.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Convert the file to csv, the split it on commas into an string array.

Add the elements from your array to your html file.
Adam R Harris 20-Dec-12 13:28pm
He wants to do it without the interops i.e. Excel not installed on the server.
If he can get the files as a csv instead of .xsl then your solution would work.
Jagdish.rkl 20-Dec-12 13:34pm
Thanks Dino and Thanks Adam.
can any one of you just provide a sample code for me. i am new to i dont know how to do this.

Thanks in advance
DinoRondelly 20-Dec-12 14:59pm
Code sample for?
I am not sure how your going to deal with the file if you dont have excel sorry, your going to have to research that a little more then i can right now.
Rate this: bad
Please Sign up or sign in to vote.

Solution 5

Thanks to all of you for your prompt response to me. i am unable to solve it yet. what i have decided is to read the data from the excel through oledb and convert it into xml. later on make that xml display as html. i have got success in converting excel to xml but no success with xml to html.

Thank you all

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 28 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100