locked
Convert Excel sheet to Html or mht RRS feed

  • Question

  • Hi all,

     

    In Vb.net,  how can I convert an excel sheet to a html or mht file?

     

    Thank you very much for your help.

     

    CT

    Monday, April 23, 2007 2:43 PM

Answers

  • Hi,

     

    I'm not to sure exazctly what you are trying to do.

    You might try this line from a webapp:

     

    Response.Redirect("C:\Path\FileName.xls")

     

    If you put that line in a button control on a web page, when the button is clicked  the  excel page will come up in your web browser.

     

     

    If you are hoping to work with the data from your web page you will need to research "Automating MS Office" The specific code depends on your version of office and VB

     

    It's also possible to use File I/O and read the excel file in binary mode then create a html textfile and put the information into the webpage. if you try this make sure to make a copy of the excelfile before you test your program because if you change the binary info it can corupt the file.

     

     

    Tom 

    Wednesday, April 25, 2007 8:04 PM

All replies

  • Please help. I am really in need for this and coudn't find a solution right now.
    Tuesday, April 24, 2007 1:28 AM
  • Hi,

     

    I'm not to sure exazctly what you are trying to do.

    You might try this line from a webapp:

     

    Response.Redirect("C:\Path\FileName.xls")

     

    If you put that line in a button control on a web page, when the button is clicked  the  excel page will come up in your web browser.

     

     

    If you are hoping to work with the data from your web page you will need to research "Automating MS Office" The specific code depends on your version of office and VB

     

    It's also possible to use File I/O and read the excel file in binary mode then create a html textfile and put the information into the webpage. if you try this make sure to make a copy of the excelfile before you test your program because if you change the binary info it can corupt the file.

     

     

    Tom 

    Wednesday, April 25, 2007 8:04 PM