1 package org.simantics.spreadsheet.fileimport;
3 import java.nio.file.Path;
4 import java.util.HashMap;
6 import java.util.Optional;
8 import org.simantics.db.Resource;
9 import org.simantics.fileimport.SimanticsResourceFileImport;
11 public class ExcelFileImport extends SimanticsResourceFileImport {
13 private static final Map<String, String> ALLOWED_EXTENSIONS = new HashMap<>(2);
16 ALLOWED_EXTENSIONS.put("*.xls", "Excel file *.xls");
17 ALLOWED_EXTENSIONS.put("*.xlsx", "Excel file *.xlsx");
21 public Optional<Resource> perform(Resource parent, Path file) throws Exception {
22 throw new UnsupportedOperationException("Excel import is not yet supported");
26 public Map<String, String> allowedExtensionsWithFilters() {
27 return ALLOWED_EXTENSIONS;