Macro for Batch Export of CSV in C.01.10

Hello. I wanted to see if anyone has come across or written a macro to export a batch of files into csv natively within Openlab C.01.10? There was a macro created for this purpose in older versions of ChemStation that was very useful. 

Parents Reply Children
  • I am looking for the raw data x-y coordinates for each injection in the batch following integration in order to create an integration table with areas, percentages, and retention times as well as overlays of each injection via macros that I have made in excel

  • ,

     

    To output just the x,y signal data from ChemStation I know of two options at least. One is given in this community post with links to the original macro posting. 

     

    Another solution is attached. This is an older user contributed macro that I have modified. To use the attached macro, first unzip and rename the extracted file to CSVxport.mac. Copy the macro to the CORE ChemStation folder. Load the macro by entering

    Macro “csvxport.mac”

    at the ChemStation command line.

     

    Then open the sequence container/data set that contains the data you would like to reprocess. My icon looks different because I manually created this one, but it will work on a standard data set as well.

     

    Make certain you are in reprocessing mode and that the loaded method shows (sequence) after it, as outlined above.

     

    Go to Method->Run Time Checklist. Make certain that Standard Data analysis is checked. This is required for the individual file naming to work. Enable the Customized Data Analysis Macro. Hit the drop down and choose Set up Custom Command template…

     

    On that screen choose Add… For the command simply enter SA_SigCSV. You can make the display name anything you like, I made mine Export signal to CSV. Leave everything else checked.

     

    Choose Done in the Custom Command Template window. Now you should be able to choose Export signal to CSV as a custom data analysis macro.

     

    Save the changes to your method and choose Sequence->Start Reprocessing.

     

    The sequence should begin processing from the beginning. Once it has completed you should have a CSV folder with a .csv file for each signal that is loaded for each data file.

    CSVxport.txt.zip
  • Hi howard_sanford, 

     

    Thank you for providing this. Will the CSV folder be exported to the data file folder for the sequence (ie.C:\Users\Public\Documents\ChemStation\1\Data)? If so, after following your guide, I am not seeing a CSV folder or any .csv files 

  • Hi howard_sanford, 

     

    please disregard the last question. I was able to get the signal files as a batch to export as a csv.

     

    Do you happen to have a macro that also exports the integration results as a csv for a batch of samples? 


    Thanks.

  • ,

     

    Yes I should have clarified that the CSV folder for the signal export will be in the same folder as the data files.

     

    I don't have a macro to export the integration results. I suppose it would be possible, but there are some reporting options that will allow for CSV output, both in classic reporting and intelligent reporting. 

     

    If you use classic reporting and specify CSV output it creates several files and one of them does contain the peak table information, though I'm not certain how useful this would be for your purposes.

     

    Intelligent reporting has a slightly better option where you can choose to output to a CSV and specify a folder where all the files will be copied to.

     

     

    Then just make certain that the sequence parameters have the sequence output set to print the individual reports for each run. 

     

    Then when you reprocess you will have a CSV for each data file in one folder. There will also still be a copy in each data folder. 

  • That is correct. If you'd like you can create a file named user.mac and in that file simply put the command to load the export macro. Put the user.mac file in the CORE folder along with the export macro and it will be loaded every time you launch ChemStation. 

     

    As for the CSV output, that is something you could change by customizing the selected Intelligent Report. The one I used was only an example. I've not done too much with IR, but you should be able to edit the Short_Area report template I used and get what you need. There are also lots of post on the community about customizing reports in IR, so that would be something to consider. 

Was this helpful?