필터 지우기
필터 지우기

Invalid expression.Unable to resolve the name

조회 수: 3 (최근 30일)
Santosh Biradar
Santosh Biradar 2022년 8월 2일
댓글: Santosh Biradar 2022년 8월 2일
Hello
[num,txt,raw] = xlsread('SummaryResult.xlsx','AAA_SheetName');
newlyAdded = readtable('SummaryResult.xlsx', 'Sheet', ''AAA_SheetName','Range','A2:D40','TextType','string');
NewData = num2str(t.BLFFileName)+"_"+num2str(t.Time_sec_);
As Excel is having Column name as "BLF File Name". As it is having space between the words. Unble to read the space.
Unable to resolve the name c.BLFFileName.
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax
error. To construct matrices, use brackets instead of parentheses.
I tried with different expression as
num2str(t.('BLF File Name'))+"_"+num2str(t.Time_sec_);
num2str(t.('BLFFileName'))+"_"+num2str(t.Time_sec_);
num2str(t.('BLF_File_Name'))+"_"+num2str(t.Time_sec_);
num2str(t.'BLF_File_Name')+"_"+num2str(t.Time_sec_);
num2str(t.(BLF_File_Name))+"_"+num2str(t.Time_sec_);
for all, showing same error msg.
Thank you
Brief Work
Please let me know for brief.

채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 2일
in your r2019b release add the readable option 'PreserveVariableNames', true
and use t.('BLF File Name')
Note that PreserveVariableNames option was changed in a later release to 'VariableNamingRule', 'preserve'

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by