08-16-2023 05:37 PM
I want to read a list of members from a excel file which is store in OS file system and store that list of member ID in a list to perform further calculation
08-17-2023 09:52 AM - edited 08-17-2023 09:56 AM
Which part of your code do you need help with?
08-17-2023 04:00 PM
Actually I have a excel file at my OS document folder which contains a list of 100 members, I want help to access that file and store those member in a list variable using Extender BR
08-18-2023 10:02 AM
I think this would be easier if you uploaded the 100 members in a text file instead of an excel file. Other options include staging those members in a custom table. Both easier than directly parsing excel, which i'm pretty sure will require a 3rd party library to be installed.
08-18-2023 08:48 AM
I did something similar using a dashboard extender rule to get a file from a file share folder and load it to a custom table. I know you are not trying to load to a custom table. (I used BRApi.Utilities.LoadCustomTableUsingDelimitedFile)
However BRApi.Utilities.GetFileShareFolder will grab the path of the file
then maybe BRApi.Utilities.ReadExcelTableRangeContent ? will get the contents? sounds promising, might be worth a look.
08-18-2023 09:59 AM - edited 08-18-2023 10:00 AM
Adding to @SeanV 's suggestion for parsing your file, here's some code to help get you started getting a file into your rule to parse it:
Dim objXFFileEx As XFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, fileFullName, includeContentFileBytes, failGracefully) Dim folderName As String = objXFFileEx.XFFile.FileInfo.FolderFullName 'Just an attribute Dim bytes As Byte() = objXFFileEx.XFFile.ContentFileBytes