I need to import an Excel file as a dataset with row and column headers, and the following option using "Dataset" does not work. However, I can import the Excel file using "Data" option as a list with no error.
adata = Import["Adata.xlsx", {"Dataset", 1}]
Import::noelem: The Import element "Dataset" is not present when importing as XLSX. $Failed
bdata = Import["Adata.xlsx", {"Data", 1}]
{{"No", "y1", "y2", "y3", "VIN"}, {10., 4., 5., 9., "x1"}, {11., 3., 6., 10., "x2"}, {12., 2., 7., 11., "x3"}, {13., 1., 8., 12., "x4"}, {14., 0., 1., 2., "x5"}}
Then, I can use the Dataset function to change the list to a dataset but don't know how to set the first row and the first column as the column and the row headers. I read the documents for Import with no success.
bdata = Dataset[Import["Adata.xlsx", {"Data", 1}]]
Thanks.
Sangdon
Import["Adata.xlsx", {"Dataset", 1}
andImport["Adata.xlsx", {"Dataset", 1}, "HeaderLines" -> {1, 1}]
works as expected in version 11.3 (windows 10/64bit). $\endgroup$ – kglr Jan 19 '19 at 4:59