Page 1 of 1

Compile Excel File of MSD Chemstation Files

Posted: Thu Mar 30, 2017 2:56 pm
by msfisher
At an early point in our lab, it was decided that MSD Chemstation files would be named with an instrument identifier followed by a number, e.g. POLAR0001. Obviously, this often makes it difficult to find a specific sample when opening a file in msda. In years past we had an Excel macro which could extract file information (location on the network, sample name, misc info, dates, etc.) which greatly eased this situation. As of Excel 2007 (we currently use 2010), the key VBA command (SHBrowsefolder) which allowed the macro to find the directory Chemstation directory containing data.ms was dropped and subsequent macros to replicate the command are torturous and not always successful.

Does someone have a macro which can extract file info NOT DATA from MSD Chemstation files to an Excel file??

Re: Compile Excel File of MSD Chemstation Files

Posted: Tue Apr 04, 2017 8:56 pm
by James_Ball
I know how you feel. I don't know any replacement for the Excel macro, except to return to the older version.

I really wish Agilent would return to the old style window when loading data files where it listed the data file name and the Sample name in two columns in the main browse window, instead of moving sample name to the small window beside the file browse one. Now instead of being able to see all of the sample names in the list, you have to click each file to see the information. Slows things down considerably.

Re: Compile Excel File of MSD Chemstation Files

Posted: Sun Apr 09, 2017 7:18 pm
by Phil91
Hi,

There is definitely a way to replace SHBrowseForFolder in your existing Excel macro.
I can dig into this if you want. You can send me your Excel file (go to VBA window and File/Export).
I don't have any more MSD Chemstation stuff, otherwise I would have created a quick macro for you. (Now retired, I spent many years working for HP...)
Unless you have a copy of msda working on Windows 10....
Let me know
Cheers
Phil

Re: Compile Excel File of MSD Chemstation Files

Posted: Thu Apr 13, 2017 6:11 pm
by msfisher
Sorry to be slow in replying. Unlike you, I'm still chained to the desk & bench...

I'll think about sending the Excel file, but it's unlikely -- largely belongs to my company. Just to clarify, what I want is a list consisting of data file location (preferably in \\server\directory\file format), actual data file name (the part before .D), sample name, acquisition date and miscellaneous information for each sample in a directory. Basically an abbreviated version of the header in rteres.txt and/or tmplibrp.txt. As I remember, getting to the directory via SHBrowseForFolder was only the tip of the iceberg -- much of that information is/was buried in the data.ms file and extracting it meant knowing where in the .ms file to tell Excel to go and where to stop. So, I can see that info with a text or word processor, but getting to it consistently is the problem. Even if all you can do is give me some idea of how to extract the sample info, that would be a huge step forward.

Thanks in advance...I'll have to check back here more often!
Hi,
There is definitely a way to replace SHBrowseForFolder in your existing Excel macro.
I can dig into this if you want. You can send me your Excel file (go to VBA window and File/Export).
I don't have any more MSD Chemstation stuff, otherwise I would have created a quick macro for you. (Now retired, I spent many years working for HP...)
Unless you have a copy of msda working on Windows 10....
Let me know
Cheers
Phil

Re: Compile Excel File of MSD Chemstation Files

Posted: Thu Jun 29, 2017 1:07 pm
by chemstation
I had a similar problem,
The excel file hyperlinked below works for Excel 2007 & 2010,
it has also been modified so that it will work with Chemstation F.00.01 ( that also has the Masshunter Sub directories, but are ignored to speed up the file searching.)

You need to enable the macros, and click on the big grey box "Browse for MSD Files" to start the macro.

https://drive.google.com/open?id=0B2uWp ... WxHRS1tQVU

By adding a data.ms file further up the directory tree, you can ,make the macro to search a wider number of sub-directories.

kind regards
Alex