visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: VBA (Office) :: Automatic spreadsheet update with folder content


By: mdensana Canada  Date: 15/11/2009 22:41:59  English  Points: 20 Status: Answered
Quality : Excellent
Hi All!

I have an excel spreadsheet with kind of folder tree structure in it and what I need to do is to have it populated with names of the files from corresponding folders on a regular basis.

I have lots of different directories and it's quite time consuming so I was wondering if it's possible to create a macro that will extract all the filenames from certain folders after mapping folder names from the spreadsheet with actual folders and sub-folders in my directory. Ideally I will have the macro being able to only append the existing list of files in the spreadsheet and do that in different color (i.e red)

Is this possible and can anybody help me create this macro?

Thanks for your good will!

Paul
By: VGR Date: 18/11/2009 07:40:41 English  Type : Answer
hello,
yes it's feasible and I can be of some help in VBA. Your VBA macro would have no problem accessing the filesystem, exploring the tree strctire in search of your counts, ***but*** there is also an other possibility : building the eXcel spreadsheet from an external program, itself exploring the tree structure ins earch of new files (I did this a lot of years behind).

An other possibility, easier, is to generate a CSV file using any DOS/Win32 program (a PHP script in CLI mode, a DOS batch, a Delphi program... all done in 5 minutes) and you would import manually the CSV file in a tab of your eXcel spredsheet, while the VBA macro would parse it and build the "results tab".

The last solution is the easiest.

if you've some problems implementing those, ask again for help ;-)

HTH
By: OpConsole Date: 03/04/2011 19:10:41 English  Type : Comment
force close

Do register to be able to answer

EContact
browser fav
page generated in 104.784010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page