+ Reply to Thread
Results 1 to 9 of 9

failure loading sheet in webpage format

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    Blaine, MN
    MS-Off Ver
    Excel 2003
    Posts
    5

    failure loading sheet in webpage format

    I am new to this forum ... not sure if I am doing things right. I am receiving a file from an application which saves as an Excel spreadsheet file with the extension of .xls, but in reality, it is a .html format file.

    Please Login or Register  to view this content.
    I get a pop up message saying

    Problems came up in the following areas during load:
    Missing file: c:\CPGISalesD files\sheet01.htm


    I want to successfully open the file so I can read the contents, but it is not loading correctly.
    Last edited by BruceCox; 09-19-2011 at 07:47 PM. Reason: confused

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: failure loading sheet in webpage format

    Hello Bruce,

    Welcome to the Forum!

    It looks like the file extension has been changed from xlsx to xls. Excel 2007 and later save workbooks as zipped HTML files. You can not open an HTML file in excel 2003 or earlier. You will need to open the file in a web browser.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-19-2011
    Location
    Blaine, MN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: failure loading sheet in webpage format

    Leith,

    thank you for your suggestions. I am not sure what the original system uses to create the file. They save it as a .xls, but if you look in side, it is all html or xml type of code with tags etc.

    I am trying to open it up using VB Script on a server which has Excel 2007 installed. What I really need is to convert it to a true .xls format which is required by another downstream 3rd party program. I thought if I could successfully open it in VB script, then saving it as a .xls should not be too difficult, but I can't seem to successfully open it. I think I see the confusion. I use Excel 2000, 2003, 2007 and 2010 depending on which environment I am in. I tried to note that in my profile, but I see only 2003 showed up. Sorry for that confusion.

    Any other thoughts given my clarification above?

    Thanks again

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: failure loading sheet in webpage format

    Hello Bruce,

    Excel 2007 will not open the file correctly if it has been saved with an xls extension. Prior to Excel 2007, workbooks were saved in binary file format. An xls extension will cause Excel 2007 to open the HTML has a binary file which result in gibberish. You will need to change the file extension to either xlsx or xlsm if it contains marcos. Once the file has the correct extension, Excel 2007 will be able to open it correctly and resave it as an xls format.
    Last edited by Leith Ross; 09-19-2011 at 04:27 PM.

  5. #5
    Registered User
    Join Date
    09-19-2011
    Location
    Blaine, MN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: failure loading sheet in webpage format

    Leith,

    Thanks for the ideas again ... still not working ....

    I took the file, copied it twice and renamed the two copies with a .xlsx and a .xlsm extension. I then ran successive tests with the vb script, but failed to open the file. I also left the .xls version in there just to try it out. Here is the code snippet:

    Please Login or Register  to view this content.
    Result is that none of the three tests successully opened their respective file.

    Now, if I double click on the files with my mouse, the .xlsx and .xlsm produce the following pop up message (except change the .xlsx or .xlsm appropriately):

    Please Login or Register  to view this content.
    I put that in a code box hoping it would make this more readable.


    If I double click on the .xls file, I get the following message:
    Please Login or Register  to view this content.
    When I click yes, the file is opened up successfully.

    When I send the file to Notepad, the initial lines look like this:
    Please Login or Register  to view this content.
    Thoughts

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: failure loading sheet in webpage format

    Hello Bruce,

    If you are attempting to open Excel 2007 files using Excel 2003 or earlier, it won't work. To read an Excel 2007 or later file using Excel 2003 or earlier requires the Microsoft Compatibility Pack.

    You can download this for free by Clicking Here. This will allow you to open, read, edit, and save Excel, Word, and PowerPoint files saved in HTML format. You will need to convert the programs and save them before you run your macros on them. Be aware the workbook may not work 100% after the conversion and may require you to make adjustments to get it running. The converted workbooks will not be named after the original. They will be named liked X0000001.xls.

  7. #7
    Registered User
    Join Date
    09-19-2011
    Location
    Blaine, MN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: failure loading sheet in webpage format

    Hi Leith,

    In the scenario I am discussing, I am using a server with 2007 Excel trying to open a workbook which I am beginning to think was created in a 2003 environment. the problem is I don't know for sure and haven't been able to find out yet. I discussed this issue with a colleague a little bit ago and he mentioned a similar issue he encountered where 2003 and older allowed files to be created with things that didn't follow standards in the header. He said that 2007 tightened up its enforcement of the standards and would not allow the file to be opened whereas it could still be successfully opened in 2003. He suggested I take my file back to a 2003 environment and try opening it there. I just did that and 2003 opened it with no problem, but 2007 will not. Maybe this is the issue.

  8. #8
    Registered User
    Join Date
    09-19-2011
    Location
    Blaine, MN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: failure loading sheet in webpage format

    Finally ... Leith at this point, not sure what I did, but I do have this working in both 2003 and 2007 environments. I will have to do some more testing and see if I can pinpoint what changed / solved this. I much appreciate the time you took to help me with this !

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: failure loading sheet in webpage format

    Hello Bruce,

    Congratulations on getting it running. I hope you can retrace the steps you took to get this working. It will be interesting to see.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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