SemanticImport function can't import Chinese characters in MS Excel.

Hello,

When I import data from an MS Excel file to Mathematica by SemanticImport function, there is error characters instead of Chinese characters.

Screenshot2022-02-22124120.jpg

May you teach me how to solve this problem?

5.xlsx (8.62 KB)

Hi Zhenyu,

Looks like a bug to me. Import works fine. I would suggest using Import and doing any type / unit conversions on the imported data.

Import["~/Downloads/5.xlsx"]
(*
{{{"采样点编号", "年", "月", "日期", "时间", "\[Degree]C", "mmHg", "DO %", "DO mg/L", "SPC-uS/cm", "C-uS/cm"}}}
*)

Are the values in each column also in 普通话 or 英语?

Hi Rohit,

Values in each column are in 普通话. If use Import function, there is need to convert List to Dataset, so I asked this question.

Zhenyu,

You can Import the spreadsheet as a Dataset

data = Import["ExampleData/elements.xls", {"Dataset", 1}, HeaderLines -> 1]

Then you can add columns, change columns, … e.g.

data[All,
 <|#,
    "Density" -> Entity["Element", #Name]["Density"],
    "Name" -> ToUpperCase[#Name],
    "Weight / Number" -> #AtomicWeight/#AtomicNumber|> &]