Skip to content Skip to sidebar Skip to footer

Html To Excel -> Simple Question

O have a ,,export to excel' function, I have some tables and it works fine, but I have one single problem. For moving to the next line I use , but what if I want to swi

Solution 1:

Simple HTML tags are supported on a limited basis by Excel. There used to be a list of supported HTML tags as well as some HTML extensions supported by Excel (from Excel 97 onwards), but I can't find it on MSDN anymore. Here's an alternate link:

http://www.code4lifesoftware.com/articles/msexcelreadme.htm

The new XML/HTML format supported from Excel 2000 onwards is a lot more complex, and requires more work:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp

Take a look at these links, hopefully you'll find the syntax you're looking for!

Solution 2:

In all Excel versions where I used this approach no other way to go to another column, but to use the table. You can mark up your html file with a table layout (although this is not recommended by W3C), and place all of the nested data table inside the main layout table. Unfortunately no other way.

P.S.: Look at Excel html format: Saving and Opening HTML Files.

The BR tag has a mso-data-placement style attribute specifying where the data is stored. The attribute can have one of the following string constants: new-cell means to start a new cell in the next row after the break and same-cell means that the break is in a cell.

Solution 3:

If you use commas and make your file a .csv, that would be one way. If you use tabs, then have it read as a tab delimited file. Basically, you need to tell Excel what your delimiter (separator character) is, and it will handle it from there.

Post a Comment for "Html To Excel -> Simple Question"