Dear Amit,
Thank you very much for this solution and the links.
An alternative solution I just found is the following:
% Download from NIER, set "format" to "csv"
url = ['http://prognos.konj.se/PxWeb/api/v1/en/' ...
'SenastePrognosen/f12_hushallensdisponiblainkomster/F1201.px'];
opts = weboptions('ContentType','text');
query = '{"query":[],"response":{"format":"csv"}}';
Response = webwrite(url,query,opts);
% Save Response as a text file: response.csv
% Following https://www.mathworks.com/matlabcentral/answers/506670-how-to-create-a-txt-file-from-char-vector-using-matlab
filename = 'Response.csv';
fid = fopen(filename,'w'); % Open file for writing (overwrite if necessary)
fprintf(fid,Response); % Write the char array
fclose(fid); % Close the file
% Finally use readtable to create the table
T = readtable(filename,'ReadVariableNames',true,'VariableNamingRule','preserve');
The resulting table T equals the full table on the NIER website.
A question: Is it possible to import Response directly as a table, without first saving it as a file to disk and using readtable?