Extracting formatted text from cell

Hi

I’m trying to export a table into HTML by generating html by hand (ie., using a formula such as "<tr><td>"&A1&"</td><td>"…).

I have several columns that represent date/time. When I use the above formula, these get converted internally to their numeric representation, so I get

<tr><td>0.53125</td><td>0.5834</td></tr> 

instead of

<tr><td>10:30 am</td><td>11:30 am</td></tr>

Is there some way to avoid this?

Also, the html export function generates too much of junk html code that is impossible to get rid of…

Thanks for any help

sb

Maybe you are better of using a real html editor for example like bluefish “Bluefish Editor : Home” or another Comparison of HTML editors - Wikipedia

Thanks for the comment. I did consider Bluefish, but the problem is that the base spreadsheet is changing continuously, and I need to create HTML snapshots. If it was for a one-time conversion, Bluefish could have been simpler.

Concatenate a formatted text instead of the cell value. If you use the Calc itself to generate the HTML code,
use some formula like that:

"<tr><td>"&TEXT(A1;"HH:MM AM/PM")&"</td><td>"

Thanks very much!

Please mark the answer by the “checked” sign icon as “correct” if it is a real solution for you. And vou can vote by the “up” and “down” arrows above and below the zero number at left side the answer text