MrExcel Publishing
Your One Stop for Excel Tips & Solutions

HTML Conversion

Posted by Greg on January 31, 2002 2:04 AM

Hi. I work with a Accounting System that unfortunately does not export reports in Excel format, rather only in HTML, but I need the info to work with in Excel.

I can open HTML file in Excel, but the column format is screwed up, or I open the HTML in Explorer (where it looks normal), select everything, copy, and paste into Excel, but again column formats and alignment are totally messed up.

Does anyone know of a HTML conversion technique or conversion software with which I can convert the HTML file to Excel file format that conserves the appearance and alignment of data so that it is usable in Excel?

Thanks in advance.

Posted by remi on January 31, 2002 2:08 AM

Tried: pasting data to excel then: data-> text to columns?

Posted by Greg on January 31, 2002 2:50 AM

Hi Remi, and thanks. I tried that but unfortunately there are no usable text indicators separating the columns. Tried also pasting the data as pure text but it put the separate columns on separate lines.

The problem is primarily in the headers above each page. It doesn't connect the cells that go across column width during the import, and instead pushes the table below over a column or two. If a header an a different page says something different, then the data below it could show up in a different column, so you have to go down almost line by line and reformat individually to get something usable.

Posted by Chris D on January 31, 2002 2:02 PM

Bummer :-(

is there any scope for importing the actual .txt file that contains the HTML commands into Excel ?

Try viewing the code within your browser, saving as a .txt file and seeing how that fares when being imported into Excel

as the raw html commands that don't contain "excel numbers" is probably limited to a few {HR}, {BR}, {A=HREF} and {P} commands, maybe you can record a macro on the imported data that deletes these?

sorry.... not much help I would think !

Posted by Chris D on January 31, 2002 2:04 PM

actually, if you want to send an example HTML file, I'll gladly fiddle around to see what I can do with it