Tag Info

New answers tagged

2

Assuming the XLS file is in this URL: url = "http://statlinks.oecdcode.org/982013061P1T001.XLS"; This gives you the list of sheets in the XLS file sheetslist = Import[url, {"XLS", "Sheets"}]; And you can Import the second sheet by Import[url, {"Sheets", sheetslist[[2]]}] Backtracking, now to get that URL... Get a list of links in the page: ...


3

I don't think SemanticImport has been designed to deal with multiple Excel sheets. I work around this problem using Import to get the number of sheets and their names, and to import them and ExportString to export them as "TSV" which, on its turn, can be imported by SemanticImportString. An intermediate conversion of DateObject/TimeObject to DateString is ...


1

sheets = Import["sample.xlsx", "Sheets"] (*{"DataSet1", "DataSet2"}*) data = Import["sample.xlsx", "Data"] (*{{{"Country", "Value"}, {"AR", 10.}, {"BE", 20.}, {"SG", 30.}, {"TW", 40.}}, {{"City", "Value", "Color"}, {"Amsterdam", 10., "Blue"}, {"London", 20., "Red"}, {"Paris", 30., "Yellow"}}}*) Set[Evaluate[Symbol[#] & /@ sheets], data]; ...


3

aA = {1, 2, 3}; Export["mfile2.xls", {"A" -> List/@ aA}] or Export["mfile2b.xls", {"A" -> Transpose@{aA}}] see also this related Q/A: Problem exporting lists to Excel


1

Export["C:\\YourPath\\test.xlsx", List /@ {1, 2, 3}]



Top 50 recent answers are included