C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Convert excel file in HTML format


Posted Date: 18 Jun 2008    Resource Type: Code Snippets    Category: File Operations
Author: vijay kumar sharmaMember Level: Silver    
Rating: Points: 10




your excel file path
Dim path As String = Server.MapPath("~/Uploads/" & fileUpload.FileName)
Dim objexcel As New Excel.Application
Dim o_nullobject As Object = System.Reflection.Missing.Value
Dim o_filePath As Object = path
Dim doc As Excel.Workbook = objexcel.Workbooks.Open(o_filePath, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject)
Dim o_newfilename As Object = Server.MapPath("~/Uploads/") & _
fileUpload.FileName.Replace(".xls", ".html")
Dim o_format As Object = Excel.XlFileFormat.xlHtml
Dim o_encoding As Object = Microsoft.Office.Core.MsoEncoding.msoEncodingUTF8
'Dim o_endings As Object = Excel.xll.WdLineEndingType.wdCRLF
objexcel.ActiveWorkbook.SaveAs(o_newfilename, o_format, o_nullobject, o_nullobject, o_nullobject, o_nullobject, Excel.XlSaveAsAccessMode.xlNoChange, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject)
lblMessage.Text = "Uploaded successfully!"
doc.Close(o_nullobject, o_nullobject, o_nullobject)





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Find Files from specific path
Previous Resource: Write into a Text File Line-By-Line
Return to Discussion Resource Index
Post New Resource
Category: File Operations


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use