How to write special characters into an Excel cell?

11 Ansichten (letzte 30 Tage)
Leon
Leon am 19 Aug. 2020
Kommentiert: Leon am 19 Aug. 2020
I'm trying to write the units of my table into the 2nd row of my Excel file. Below is the code:
writecell(T.Properties.VariableUnits,filename,'Range',"A2")
My question is how do I write special characters into the cells?
T1.Properties.VariableUnits = {'\circC', '\Omega', '\mumol/kg'};
Many thanks.

Akzeptierte Antwort

Sindar
Sindar am 19 Aug. 2020
If you can find the numeric code for the symbols, it should print with that. For example, this prints π | ϕ | μmol/kg
T1.Properties.VariableUnits = {char(960), char(981), [char(956) 'mol/kg']};
writecell(T1.Properties.VariableUnits,filename,'Range',"A2")
  3 Kommentare
Leon
Leon am 19 Aug. 2020
Many thanks!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Find more on Characters and Strings in Help Center and File Exchange

Tags

Produkte


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by