+ Reply to Thread
Results 1 to 20 of 20

How to save .htm (HTML) extension excel file as .xls excel file

  1. #1
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    How to save .htm (HTML) extension excel file as .xls excel file

    Hello All,

    I am new to VBA.I have one situation, where I have to save htm extension files as excel file. Please advise me how to do it.

    I will download excel files from a web based application, the excel is opening with htm extension. I want to write macro(VBA) to save the file in a common folder and it has to take name from a cell of the file, which i downloaded from web based application.

    While trying to accessing the excel file(downloaded file) through VBA, VBA is not recognizing it as excel because of the file extension(htm).

    Appreciate your help in this situation.

    Thanks & Regards,
    Vishnu V

  2. #2
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hello All,

    Could you please help me ???

    Thanks,
    Vishnu V

  3. #3
    Registered User
    Join Date
    05-11-2012
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Are you sure the file you are downloading is a valid excel file?

    Can you try opening it with notepad and pasting part of the contents here?

  4. #4
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hello,

    Yes, it is opening in excel only(actually it is a excel file downloaded from a web based application, while we downloading it is coming with htm extension).

    Thanks,

  5. #5
    Registered User
    Join Date
    05-11-2012
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Can you not force the web application to save the downloaded file with a .xls extension for example?

    It might be worth looking into MIME

  6. #6
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    No, i cannt.after i download the file from the web application, i have to save the file as excel manually everytime.

  7. #7
    Registered User
    Join Date
    05-11-2012
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Well this is more of an issue with the web application then, did you write it yourself?

  8. #8
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Yes, i have logic for this macro, but i got struck with this issue.

  9. #9
    Registered User
    Join Date
    05-11-2012
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Sorry I meant to ask if you wrote the web application yourself?

  10. #10
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    no...i am a end user of the application.

  11. #11
    Registered User
    Join Date
    05-11-2012
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Well I dont think VBA will offer a solution here as the problem occurs before you even open the excel file.
    I think the problem might lie with the web application. It's not providing the MIME type to your web browser when downloading.

    You can either seek support from the web application or if you're using a large number of excel files, you can download them all to a specific location and use a script to change all extensions to ".xls" etc.

  12. #12
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    ok,,thanks for your help.

  13. #13
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hello All,

    Can i expect any help from anyone???

    Thanks,
    Vishnu

  14. #14
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Can anyone answer to my question, as i am searching for answer from last 15days....Plz......

  15. #15
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hasn't VBee answered your question?

  16. #16
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hello,

    No, he hasnot answered my question.

    Thanks,

  17. #17
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Well what else do you want to know, it looks like he has answered it?

  18. #18
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    He suggested that to change the web application. but it is not possible from my end, as i am an endu user.

  19. #19
    Registered User
    Join Date
    02-03-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    Hello All...

    Thanks to everyone. i got the answer.

    I wrote the code and put in addin for save the file.now i can download the excel(with .htm extension) from web application and able to run the macro to save the file.

    Thanks & Regards,
    Vishnu

  20. #20
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to save .htm (HTML) extension excel file as .xls excel file

    @ vishnu01445

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1