OriginPro 9.1 SR0 64-bit/32-bit, Win7 64-bit, running in VMware Fusion 5.0.3
How can I get the filepath as a string variable of every file that has been imported into worksheets in a project? I have searched both help and the OC source code for how to do this but it isn't clear. In the Organizer for a workbook, there is the "Imported Files" node but I can't figure out how to drill down to get the FilePath from it.
The code would need to be generic enough to handle workbooks with multiple worksheets and worksheets that contain data that wasn't imported.
EDIT:
I created this but am not sure how efficient or robust it is:
foreach (WorksheetPage wsPage in Project.WorksheetPages)
{
Tree tnFiles;
if (tree_get_binary_storage(tnFiles, wsPage, "Files"))
{
foreach(TreeNode trFile in tnFiles.Children)
{
string strFilePath = trFile.Info.FilePath.strVal;
}
}
}