App Designer Input Headers for Table

24 views (last 30 days)
Amanda
Amanda on 8 Jul 2022
Edited: Cris LaPierre on 8 Jul 2022
Hello!
I have been searching for what I want, but have been unsecessful in finding it. I am building a tool in App Designer that allows someone to input a text file with row and columns of data. I have been able to get the data file imported using a button that allows you to select the file and places it in a table. What I want to be able to do is allow the user to enter the headers for the columns. Is there an easy way that this can be done?
Thanks!

Answers (1)

Cris LaPierre
Cris LaPierre on 8 Jul 2022
Edited: Cris LaPierre on 8 Jul 2022
You could set the 'VariableNames' property of the table passed to the uitable.
  • By default, the column names displayed in the app match the VariableNames property of the table array. Changing the ColumnName property of the Table UI component updates the UI, but it does not update the variable names in the table array.
You can see some examples here.
To just change what appears in the app's uitable, set the ColumnName property.

Categories

Find more on Tables in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!