MATLAB: Importing an empty text column rather than a number column

importing an empty text column rather than a number columnMATLABnanreadtablesingle quotes

Hello,
I have a excel spreadsheet with 12 columns that I imported into MATLAB using readtable. The issue is there are two text columns which could sometimes be empty and sometimes not. Whenever its empty and i run the code MATLAB imports the table and replaces the empty cells with NAN showing its not a text column but i want it to be replaces with single qoutes (' ') instead because it is a text column.

Best Answer

Are you already using something like detectImportOptions() or spreadsheetImportOptions()? If not, look at that
And then look at setVarType().