read and store in database the cell content with multi font color and size

jsb1921

Board Regular
Joined
Aug 14, 2020
Messages
74
Office Version
  1. 2007
Platform
  1. Windows
  2. Web
Multiple font color/sizes in one cell beautifully explains how to store Multiple font color/sizes in one cell. I am interested in the reverse. using vba, I am reading the cells.value(row, col) and inserting to a mysql database. every thing is working ok, except, I am losing the font/ size of part of the hilighted text in my database.
VBA Code:
...
value1=Chr(34) + Cells(row, "A").Value)+ Chr(34)
value2=Chr(34) + Cells(row, "B").Value)+ Chr(34)
sql = "INSERT INTO table1 (col1, col2) VALUES (" + value1 + "," + value2 + ");"
conn.Execute sql
...
is there a way I can retrieve value1 and store in mysql without loosing its color/size in part of the text in a cell value.
vaguely can I get retrive something like Semper Fi or apply a richtext conversion or html conversion or something.

Appreciate all help
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
the last line above should read:
vaguely can I get something like
VBA Code:
...
[COLOR="Red"][SIZE="3"]Semper Fi[/SIZE][/COLOR] :rambo:
...
or can I apply any richtext conversion or html conversion or escaping or something.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top