VP.ActionContribution.HasNodeType L0.Library
VP.ActionContribution.HasAction ACTIONS.NewSheetBook
+MOD.Contributions.ImportSheetBook : VP.ActionContribution
+ L0.HasLabel "Spreadsheet"
+ VP.ActionContribution.HasImage SILK.star
+ VP.ActionContribution.HasCategory VP.ImportActionCategory
+ VP.ActionContribution.HasNodeType L0.Library
+ VP.ActionContribution.HasAction ACTIONS.ImportSheetBook
+
MOD.Contributions.ActivateModel : VP.ActionContribution
L0.HasLabel "Activate"
VP.ActionContribution.HasImage SILK.bullet_go
VP.BrowseContext.SupportsRenamingOf MBC.Symbol
VP.BrowseContext.HasActionContribution
MOD.Contributions.NewSheetBook
+ MOD.Contributions.ImportSheetBook
@VP.renamingTestContribution
L0.SharedOntology
@MOD.sclAction "createSCLQueryTypeAction"
ACTIONS.NewSheetBook
@MOD.sclAction "createSpreadsheetBookAction"
+ACTIONS.ImportSheetBook
+ @MOD.sclAction "importSpreadsheetBookAction"
ACTIONS.ActivateModel
@MOD.sclAction "activateModelAction"
ACTIONS.MigrateComponentType : ACT.Action
include "Simantics/DB"
include "Simantics/Ontologies"
include "Simantics/SCL"
+include "Simantics/UI"
include "Document/All"
include "File"
importJava "org.simantics.spreadsheet.graph.ExcelImport" where
importBook :: Resource -> File -> <Proc> ()
+importSpreadsheetBookAction :: Resource -> <Proc> ()
+importSpreadsheetBookAction res = match fileDialog "foo" [("Excel file", "*.xls"), ("Excel File", "*.xlsx")] with
+ Nothing -> ()
+ Just file -> importBook res file
+
createSpreadsheetBookAction :: Resource -> <Proc> ()
createSpreadsheetBookAction res = do
syncWrite (\() -> createSpreadsheetBookDefault res)