What is xlshtml?

What is xlshtml?

I want to generate as easy as possible a file that opens in Excel when the user double-clicks it, and which has a minimal style.

XLS meets my user requirements, but it’s not easy to generate. CSV is easy to generate, but lacks style. HTML is easily generated and has a style, but does not open in Excel when you double-click (you can File-> Open, but this is not enough, and you can save it as .XLS, but then the user receives a warning).

I see in the file extension associations on this PC that there is the extension ".xlshtml", "Microsoft Office Excel HTML Document", which opens in Excel by default. It looks promising. However, I can’t understand what it is. This is not just HTML (which gives a warning as above, which points to my plain HTML). My version of Excel cannot save it. MSDN has virtually nothing, and Google seems to only enlarge the pages that are listed as a possible file name extension for Excel files.

Does anyone know what it is? Is this some kind of special kind of HTML that Excel likes? Does anyone have a pattern that I can see?

EDIT: based on the Divo hint, I found this . This is similar to the Office 2000/10 feature, which allows you to save HTML with additional Office built-in features on the XML islands. This seems like a pretty strict format that they are deprecated because no one has used it. I am still browsing the documents that I found, but I still have not figured out how to make a file in this format.

+4
source share
3 answers

I have no example, but I'm sure you have the appropriate XSD or DTD. Perhaps try makign dummy excel doc and save it like this. If it uses DTD / XSD, it must be inline or have a link to it somewhere.

0
source

I can create the following file:

<html> <body> <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table> </body> </html> 

... and then save it with the extension .xls, I can double-click it and open it in Excel. In this case, I do not receive a warning.

Of course, it is not encrypted, so you have to reprogram the proprietary CSS for MS, which he likes to use when exporting an XLS file in HTML format.

0
source

After saving your HTML as filename.html (extension .html) you can use some basic formatting, for example: <body><table border="1">

0
source

Source: https://habr.com/ru/post/1302181/


All Articles