I have a Drop Box file that users put in XML docs. I want to code for the following processes:
Part 1 : getting the file count
I would like to have an excel sheet that shows the number of files sorted by date in each row
Part 2 : Checking XML
To check the inner xml part for a 1 or 0 of a specific line of code
Part 3 : updating the excel doc dynamically
Each time the excel doc is opened and it checks the sub folders does 1 and 2 adding a new row if new date last modified is found.
I have 5 columns in the excel doc with the top row being a label on a sheet as follow:
Column A has the dates
Column B has part 1 from folder 1
Column C has part 1+2 with xml code being 0
Column D has part 1+2 with xml code being 1 from folder 2
Column E has part 1 from folder 3
I know javascript quite well but I have never used it outside of Quickbase. How would I even get started on getting this set up?
Edit 1:
For clarifications the folder tree looks like this
../Dropbox/SharedWorkFolder/APIReports/auditreports.xlsm
../Dropbox/SharedWorkFolder/APIReports/OrderLog/(xmls for column A+C+D)(roughly 2k files)
../Dropbox/SharedWorkFolder/APIReports/PandA/(xmls for column A+B)(11k files)
../Dropbox/SharedWorkFolder/APIReports/SpecificLookup/(xmls for column A+E)(130 files)
So far I have been reading documentations for excel and I found I have been lacking in my understanding of how diverse it was.
So far I have managed to import the file content themselves but as they very in length and xml contents I need specific xml tags pulled sadly non of them have a date except for the file names and while importing they seem to have grouped individually per file as well.
The file name looks like this 1452521833783-110120160917SS110313
means the 1st string being a transaction number then date+time "SS" and some 6 number string.
I will continue reading the documentation for excel VBA stuff and testing a few things
Edit 2:
And I found this code "Excel VBA using FileSystemObject to list file last date modified" but it keeps giving me an error user defined type not defined.
Edit 3: So far I am able to use this code
Dim iRow
Sub ListFiles()
iRow = 11
Call ListMyFiles(Range("C7"), Range("C8"))
End Sub
Sub ListMyFiles(mySourcePath, IncludeSubfolders)
Set MyObject = New Scripting.FileSystemObject
Set mySource = MyObject.GetFolder(mySourcePath)
On Error Resume Next
For Each myFile In mySource.Files
iCol = 2
Cells(iRow, iCol).Value = myFile.Path
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.Name
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.Size
iCol = iCol + 1
Cells(iRow, iCol).Value = myFile.DateLastModified
iRow = iRow + 1
Next
If IncludeSubfolders Then
For Each mySubFolder In mySource.SubFolders
Call ListMyFiles(mySubFolder.Path, True)
Next
End If
End Sub
I still need to loop through all the XML and get specific nodes though and oh having issues with the map because the XML's have no map assigned to them and they all have different amounts of nodes (but 1 series of recurring that I need).