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

jsb1921

New Member
Joined
Aug 14, 2020
Messages
2
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
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

jsb1921

New Member
Joined
Aug 14, 2020
Messages
2
Office Version
  1. 2007
Platform
  1. Windows
  2. Web
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,298
Messages
5,595,310
Members
413,986
Latest member
Elizsk

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
Top