PDA

View Full Version : Convert Excel range into HTML table



arcade005
08-06-2020, 06:32 AM
Hi all,

I wanted to set a macro to automatically retrieve the range i need, and then convert it into a HTML table like the below picture so that i could insert into outlook email
26958
Requirement
(a) The first row of the HTML table should be A to Z
(b) The first column is numbering
(c) The first two columns in 1 colour (CODE: #E5E8E8) and the rest in another colour (code: red)
(d) To skip columns "Sex" and "Hobby"
(e) any text format

I have tried to make reference to the guide in the below link, but it provides me only a solution to convert my information into a "fixed format" (i.e. font: calibri ; text size: 12....)
https://excelsirji.com/vba-code-to-convert-excel-range-into-html-table/

I am a newbie to VBA and need a helping hand. Would my requirement(s) result in very complicated code? Really need help formatting the HTML table. :banghead:

Million thanks.

Logit
08-06-2020, 08:12 AM
.
https://analystcave.com/excel-export-excel-to-html-convert-tables-html/

https://officetricks.com/convert-excel-html-table-vba-macro-code/

SamT
08-06-2020, 10:23 AM
Save As >> Single Page Web file