Click here to Skip to main content
15,924,193 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Converting excell file into html file Pin
Sandeep Akhare20-Apr-07 1:42
Sandeep Akhare20-Apr-07 1:42 
GeneralRe: Converting excell file into html file Pin
Lijo Rajan20-Apr-07 1:54
Lijo Rajan20-Apr-07 1:54 
GeneralRe: Converting excell file into html file Pin
Arun.Immanuel20-Apr-07 2:39
Arun.Immanuel20-Apr-07 2:39 
GeneralRe: Converting excell file into html file Pin
Lijo Rajan20-Apr-07 3:04
Lijo Rajan20-Apr-07 3:04 
GeneralRe: Converting excell file into html file Pin
Arun.Immanuel21-Apr-07 22:57
Arun.Immanuel21-Apr-07 22:57 
GeneralRe: Converting excell file into html file Pin
Arun.Immanuel21-Apr-07 23:15
Arun.Immanuel21-Apr-07 23:15 
GeneralRe: Converting excell file into html file Pin
Lijo Rajan23-Apr-07 1:08
Lijo Rajan23-Apr-07 1:08 
GeneralRe: Converting excell file into html file Pin
Arun.Immanuel23-Apr-07 1:39
Arun.Immanuel23-Apr-07 1:39 
Hi,

Here is the entire code:

using System;
using System.Collections ;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Office;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

Excel.Application excel = null; //In my system i am unable to refer the class Excel.Application like what U have.

Excel.Workbook xls = null;
excel = new Excel.Application();
object missing = Type.Missing;
object trueObject = true;
excel.Visible = false;
excel.DisplayAlerts = false;

xls = excel.Workbooks.Open("E:\\aOfficial\\MyFiles\\Output1.xls", missing, missing, missing,

missing,missing,missing,missing,missing,missing, missing,missing,

missing,missing,missing);

object format = Excel.XlFileFormat.xlHtml;

IEnumerator wsEnumerator=excel.ActiveWorkbook.Worksheets.GetEnumerator();
int i = 1;

while (wsEnumerator.MoveNext ())
{

Excel.Worksheet wsCurrent = (Excel.Worksheet )wsEnumerator.Current;//This is the only change
String outputFile = "d:\\a" + "." + i.ToString() + ".html";
wsCurrent.SaveAs(outputFile, format, missing, missing, missing,
missing, missing, missing, missing, missing);

}
excel.Quit ();

}
}



Regards,
Arun Kumar.A

GeneralRe: Converting excell file into html file Pin
Lijo Rajan23-Apr-07 4:08
Lijo Rajan23-Apr-07 4:08 
QuestionHow can we pass more than one Query String in the site map, Pin
kaushik49019-Apr-07 19:53
kaushik49019-Apr-07 19:53 
AnswerRe: How can we pass more than one Query String in the site map, Pin
Davide Icardi20-Apr-07 5:17
Davide Icardi20-Apr-07 5:17 
QuestionRe: How can we pass more than one Query String in the site map, [modified] Pin
kaushik49020-Apr-07 17:47
kaushik49020-Apr-07 17:47 
QuestionIIS Response Pin
NICE TO MEET19-Apr-07 19:31
NICE TO MEET19-Apr-07 19:31 
AnswerRe: IIS Response Pin
sangramkp20-Apr-07 2:22
sangramkp20-Apr-07 2:22 
QuestionString Encrypt and Decrypt Pin
monuSaini19-Apr-07 19:25
monuSaini19-Apr-07 19:25 
AnswerRe: String Encrypt and Decrypt Pin
Sathesh Sakthivel19-Apr-07 19:30
Sathesh Sakthivel19-Apr-07 19:30 
GeneralRe: String Encrypt and Decrypt Pin
monuSaini19-Apr-07 19:56
monuSaini19-Apr-07 19:56 
GeneralRe: String Encrypt and Decrypt Pin
monuSaini19-Apr-07 21:33
monuSaini19-Apr-07 21:33 
GeneralRe: String Encrypt and Decrypt Pin
Sathesh Sakthivel19-Apr-07 23:01
Sathesh Sakthivel19-Apr-07 23:01 
QuestionData Grid Row Color Pin
NICE TO MEET19-Apr-07 19:14
NICE TO MEET19-Apr-07 19:14 
AnswerRe: Data Grid Row Color Pin
Sathesh Sakthivel19-Apr-07 19:34
Sathesh Sakthivel19-Apr-07 19:34 
AnswerRe: Data Grid Row Color Pin
Mayank Parmar19-Apr-07 19:44
professionalMayank Parmar19-Apr-07 19:44 
Question.net remoting and object invocation Pin
alimohammed19-Apr-07 18:43
alimohammed19-Apr-07 18:43 
AnswerRe: .net remoting and object invocation Pin
xibeifeijian19-Apr-07 20:36
xibeifeijian19-Apr-07 20:36 
GeneralRe: .net remoting and object invocation Pin
alimohammed19-Apr-07 21:37
alimohammed19-Apr-07 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.