Posts

Showing posts from June, 2012

Advertisement.

TransHimalaya.in

Everest Helicopter Tour for a day

Book exciting packages at www.transhimalaya.in

Convert excel to HTML and ftp upload second method

Start “Microsoft Visual Basic 2008 Express." Select the “File” menu, then click “New Project…” Click “Windows Forms Application” under “Visual Studio installed templates.” Select “OK."


Click “Project,” then select “Add Reference." Click “COM," select “Microsoft Excel 12.0 Object Library” and click “OK."


Imports Microsoft.Office.Interop


Public Class Form1
    Public status As String
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim excelApplication As New Excel.Application
        Dim excelWrkBook As Excel.Workbook
        excelApplication.Visible = False
        excelApplication.DisplayAlerts = False
        Dim theFile As String = "abc.xlsx"
        status = status & " Loading xlsx "
        excelWrkBook = excelApplication.Workbooks.Open("E:\webapp\ppm\upload\PPM\DAILYFLASH\" & theFile)
        Dim tempSourceFile As String = "E:\winapps\excel2htmlconverter\excel2htmlco…

Convert Excel to HTML and ftp upload

Start Visual Studio.On the File menu, point to New, and then click Project.In the templates pane, expand Visual C# or Visual Basic, and then expand Office.Under the expanded Office node, select the 2007 if you have Excel 2007 installed, or select the 2010 node if you have Excel 2010 installed.In the list of project templates, select Excel 2007 Add-in or Excel 2010 Add-in.In the Name box, type Excel2HtmlConverter. Click OK.
Imports System.IO Imports System.Data Imports System.Net Imports System.Threading Imports System.Net.Sockets Imports MySql.Data.MySqlClient
PublicClassThisAddIn Public status AsString
PrivateSub ThisAddIn_Startup() HandlesMe.Startup Dim theFile AsString = getFilename()         Application.Workbooks.Open("E:\webapp\ppm\upload\PPM\DAILYFLASH\" & theFile)         status = status & " Loading xlsx " Dim touploadFile AsString = "E:\winapps\dailyFlashExcel2Html\dailyFlashExcel2Html\bin\Debug\htm\" & "dfcr" & Left(theFile, 8) &…

Convert Excel to HTML VB.Net

Start Visual Studio.On the File menu, point to New, and then click Project.In the templates pane, expand Visual C# or Visual Basic, and then expand Office.Under the expanded Office node, select the 2007 if you have Excel 2007 installed, or select the 2010 node if you have Excel 2010 installed.In the list of project templates, select Excel 2007 Add-in or Excel 2010 Add-in.In the Name box, type Excel2HtmlConverter. Click OK.
Now write following code

Public Class ThisAddIn


    Private Sub ThisAddIn_Startup() Handles Me.Startup
        Application.Workbooks.Open("c:/vin.xlsx")
    End Sub


    Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
        Application.ActiveWorkbook.SaveAs("c:/vin.htm", Excel.XlFileFormat.xlHtml)
    End Sub


End Class

This will convert .xlsx file to html file. Choose path appropriately.
By: - Vinod Kotiya

Google+ Followers