ALL BUSINESS ENGLISH ARTICLES MICROSOFT EXCEL TIPS

Excel to HTML responsive table – VBA Code

This is a result of vba code. You can see the table Calendar on Sheet1 and how it is when you copy the HTML created code to a wordpress post. The table will adjust well both on desktop and mobile devices.

Excel to HTML Responsive table

Excel table

table_calendar

HTML table

Period Weekly Options Booked
May 12 – May 19 2000 Row 1, Col 1 Row 1, Col 2
2 Text2_2
3 Text3_2
4
5
metavliti

HTML created code

<style>table {   width: 100%;   table-layout: fixed;}th, td {   padding: 5px;   text-align: center;   overflow-wrap: break-word;   word-wrap: break-word;   hyphens: auto;}@media only screen and (max-width: 600px) {   th, td {       width: auto !important;   }}</style><table border=’1′ cellspacing=’0′ cellpadding=’5′><tr><td>Period</td><td>Weekly</td><td>Options</td><td>Booked</td></tr><tr><td>May 12 – May 19</td><td>2000</td><td>Row 1, Col 1</td><td>Row 1, Col 2</td></tr><tr><td>2</td><td></td><td></td><td>Text2_2</td></tr><tr><td>3</td><td></td><td></td><td>Text3_2</td></tr><tr><td>4</td><td></td><td></td><td></td></tr><tr><td>5</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>metavliti</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr><tr><td>-</td><td></td><td></td><td></td></tr></table>
Views: 14

Comments are closed.

Pin It

By continuing to use the site, you agree to the use of cookies. / Συνεχίζοντας να χρησιμοποιείτε την ιστοσελίδα, συμφωνείτε με τη χρήση των cookies. more information / περισσότερες πληροφορίες

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close