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\excel2htmlconverter\bin\Debug\htm\" & "dailycompile" & ".xls"
        status = status & " Converting to xls"


        excelWrkBook.SaveAs(tempSourceFile, _
        FileFormat:=Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel8)
        excelWrkBook.Close()
        excelApplication.DisplayAlerts = True
        excelApplication.Quit()


        status = status & " Converting to HTML "
        'start upload
        FtpUploadFileToServer("191.254.1.42", tempSourceFile, "/var/www/dp/ext/ppmmob/files/dailycompile/", , "admin", "admin&123", , True)
        makeLog()




    End Sub


- Vinod Kotiya

Comments

Most Viewed Post

solution for facebook static.ak.fbcdn.net waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers