Importing a Table :: [Variables are been modified by Matlab]
193 views (last 30 days)
Hi I have recently started using matlab. I am trying to import a spreadsheet as a table and some of my variables [Colum Names] get modified when I look at them using T.Properties.Variablenames. So I checked the function genvalidnames which is apparently responsible for changing the "non-matlab" variable names to standard matlab variable names. My Column names in the Spreadsheet all start with a character, have only underscores and are not longer than nameslength which i checked is 63. Still I get the modified names. Any idea why this will be happening.
Image Analyst on 28 Apr 2016
I don't see how it's being changed. Here is my code:
t = readtable('VAT_Experiment_Sheet_Assign_Table_Structure_Units.xlsx')
and here is what I see:
Unless I'm overlooking something, like a double underline or something, the "DCDC_OutputOC_Fault_BOOL" looks the same in both Excel and MATLAB.
More Answers (1)
Bill Tubbs on 12 Oct 2021
Edited: Bill Tubbs on 12 Oct 2021
The answer by Steven Lord didn't work for me. I got this error:
Error using readtable (line 198)
Unknown Parameter 'VariableNamingRule'.
But the following solution (as explained here) works for me in MATLAB R2020a: