I made a web platform where users can add a long description for a product. The Description field is a wysiwyg editor and the content is saved in HTML in my database (MySQL).
The users rewrote all the descriptions in an Excel file because they have a lot of products (1700+) and they want to do a bulk import of these texts in the database : 1 cell = 1 description = 1 product.
They formatted the texts (bold, italic, underline, paragraphs...) and I must keep that layout when I will import these descriptions in the database. So, I have to convert these texts into HTML language.
Any idea ?
The only way I found is to :
- Copy-paste the cells in a Word file (to keep the layout).
- Copy-paste the Word content to an online HTML converter.
- Copy-paste the converted text to another Excel file for my bulk import.
It would be really time-consuming for the 1700+ products (besides, we have multiple languages...).
EDIT :
[Imagine this text in a cell]
Vestibulum eget viverra nisi.
Maecenas non aliquet dui. Maecenas varius, ante vel pharetra porta, augue lectus accumsan risus, non dapibus orci leo a erat.
Suspendisse varius nisi quis metus semper dapibus. Cras ullamcorper iaculis tortor eget rhoncus. Integer hendrerit vulputate felis
[I want this in a cell]
<p><strong>Vestibulum eget viverra nisi.</strong></p>
<p>Maecenas non aliquet dui. Maecenas varius, ante vel pharetra porta, augue lectus accumsan risus, non dapibus orci leo a erat.</p>
<p><em>Suspendisse varius nisi quis metus semper dapibus.</em> Cras ullamcorper iaculis tortor eget rhoncus. Integer hendrerit vulputate felis</p>
Or maybe this (replace the line breaks with <br />
tags) :
<strong>Vestibulum eget viverra nisi.</strong><br />
<br />
Maecenas non aliquet dui. Maecenas varius, ante vel pharetra porta, augue lectus accumsan risus, non dapibus orci leo a erat.<br />
<br />
<em>Suspendisse varius nisi quis metus semper dapibus.</em> Cras ullamcorper iaculis tortor eget rhoncus. Integer hendrerit vulputate felis
` or `
` ? I think that if I converted an Excel file to XML, I wouldn't have that. I would have each cell in a specific XML tag (column name) but that's all. XML and HTML are different.
– Eve Jul 04 '22 at 12:42