View Full Version : Convert MHTML To Excel/Access?

07-12-2004, 01:13 PM
I need some help on this one as I have no experience of programming really. What I have is a series of MHTML (.mht) files which I need to be able to convert into an Excel Spreadsheet or Access database. Now I can import the files into Excel, however it includes all the source code as well. What i want it to simply do is generate the same kind of view as the MHTML file has when viewed in IE, it doesn't matter if the images are in Excel or not, just as long as the info of the page is. I've searched all over the net for a tool for this but can't find anything.

Does anyone know of a program for this? Or could anyone provide me with the source code for a small app that could successfully convert from .mht files to either .mdb or .xls?

The idea is because these .mht files are autuomatically generated by a program I have that pulls the data of your computer and generates a report in this file, but I need to have a database of these as this needs to be done for every machine where I work. Any help with this would be greatly appreciated.


07-12-2004, 11:47 PM
I'm not sure what an MHTML file is (I found the definition to be MIME HTML..), but it looks like it's just a regular HTML file with MIME standards.

The reason there's no tool available is because not all MHTML files are alike. It just so happens that YOUR mht files probably all look alike because they're generated by the same program. Yours is a special case, and unless someone else has run into the same issue with the same program, it probably isn't documented how to convert your mht files to something Excel can read.

If we could see the underlying source code (possibly you could attach the mht file) so we can see how it's formatted, then someone might be able to help you put together a script to convert an mht file to a csv (comma separated) file, with which you can import that data in Excel. The idea is that you want to strip the code, and be left with the data.

Hope that helps,

07-13-2004, 10:07 AM
Where is mHTML anyway? Haven't seen him for a while...

And now back on topic: I don't know of any tool that converts the data straight into Excel, but you might have more luck looking for HTML or XML tools that might be able to export the data into a text formal, which Excel will be able to import.


07-13-2004, 12:37 PM
I've managed to get it into Excel now, but the goddam data only has to be annoying and not be delimeted and better yet breaks the freaking line for wrapping issues which is just going to give me a hell of a lot of work to create a 300 line record for a database with 2000 records.

12-28-2006, 12:54 PM
I am also having the same issue right now of converting the .mht files into .xls files, can you please let me know how you were able to do the mentioned conversion.

Thanks in Advance