What is the exact reason of this error? I am not getting it. Any help will be appreciated.

5 views (last 30 days)
parameters
simout
tout
 
xlswrite('s101_n00.xlsx',[tout,simout,parameters],'Sheet1','A2')
col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​
xlswrite('s101_n00.xlsx',col_headers,'Sheet1','A1')
Error: Invalid text character. Check for unsupported symbol, invisible character, or pasting of
non-ASCII characters.
  1 Comment
Mathieu NOE
Mathieu NOE on 18 Oct 2021
hello
I could not make it work untill I rewrotte the line with col_headers in my own command window with
maybe an issue with a copy / paste that created an issue ??
col_headers = {'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}
xlswrite('s101_n00.xlsx',col_headers,'Sheet1','A1')

Sign in to comment.

Answers (1)

Dave B
Dave B on 18 Oct 2021
As @Mathieu NOE points out, there's something a little strange in your col_headers = line. This line has a bunch of extra characters, specifically a bunch of characters marked with Unicode 8203 (Zero Width Space). You can't see these characters, (because they have zero width), but if you try to arrow around through them in the editor or command window you might notice your cursor getting 'stuck'.
col_headers_line="col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​"
col_headers_line = "col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​"
double(col_headers_line{:})==8203 % or skip the ==8203 in MATLAB desktop and they'll jump right out at you
ans = 1×91 logical array
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!