I'm working on a Data plugin to add custom properties to files but those properties are stored in a separate file within the same folder.
Is it possible to load an extra file inside of a data plugin ?
I basically want my data plugin to load the selected file inside of data portal like a simple data plugin would do but also load a specific file in my data portal at the same time, it is possible ?
I tried adding :
call DataFileLoad("fullFilePath") that return error because dataFileload does not work in VBS dataplugin
Set oFile = OpenFile("fullFilePath") that does not make error but still does not load file in dataportal
I found an old post about this but it does not work for me :
Thanks for the help.
Solved! Go to Solution.
Dim oMyFile : Set oMyFile = OpenFile("c:\test.txt")
Is not supposed to pull anything into the data portal, it just creates a File object. You can work in script to parse that files properties/contents and add them to your data. You can type "openfile" in diadem script help to find more information on OpenFile() method, File object and other related commands, pretty good detail:
Thanks for your answer
I looked into it and found something similar using :
Dim oExcelFile Set oExcelFile = OpenSpreadsheet("c:\test.xlsx") Dim oCurrSheet: Set oCurrSheet = oExcelFile.Sheets(1) Dim oCellValue: oCellValue = oCurrSheet.GetCellValue(5,2) call Root.Properties.Add("Generic_Metadata~ID", oCellValue)
This let me harvest data from an other xlsx file and implement them as properties to my main file within dataplugin