Hi, would be more than happy to, I just hope this explanation is understandable :P
1.) I modified the code that was looking at the temp wb range, before it was adding an extra row of cells, I used the "End(xlUp).Row" method for finding the last row of data, then stored that range into a variable "rng_used" (A to lastrow, E to lastrow) and styled rng_used directly. Note: I modified the publish objects code to point to the new range variable
2.) I noticed that excel's default setting for exporting excel data/formatting to HTML markup was having it add an additional <tr> (table row) </tr> for "ifSupportMisalignedColumns" browser property so I figured we could take that out to get rid of the extra row. I created two Int variables, one to hold the position of the 1st character of the HTML string where we wanted to start removing markup, and a 2nd character to find the position where we want to stop removing markup (by using instr() function, and adjusting the end search string for the # of characters in the search string, in this case 11). After we find our positions, we can image chopping our HTML string variable into three parts, left, middle and right, in effect we are chopping out the middle and attaching the left directly to the right (by using a temp variable), then once we are done we return the temp variable to the function as RangeToHTML and we are done
html_.jpg
Bookmarks