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
  • Hello,

     

    Would you mind clarifying what you mean by exporting to csv? Are you looking for a summary report for a batch of samples in a .csv format or do you want the raw data x-y coordinates from the detector signal exported for each injection in a batch to a .csv file?

  • 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

  • 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. 

  • Hi howard_sanford, 

     

    Thanks for that option. The report CSV doesn't really give me all that I am looking for, and then would require a good bit of deletion in order for my macro in excel to work. 

     

    One question about the Signal CSV export option. It appears that each time I close and reopen Chemstation, I will need to reload the macro into the command bar in order for the signal CVS files to be export. Does this seem accurate

  • Thanks a lot for sharing. Recently I am trying to install this script in our OpenLab system by following what the post described. But seems that cmd from OpenLab cannot recognize the CSVxport file, which I think might be because the file needs to be a true .mac file, and modifying the format by changing the name would not work. Do you have any comments and suggestions?

  • Hi ,

    For ChemStation the standard macro .mac file is a plain text file, so the instructions above for changing the extension on the attached file from .txt to .mac will allow ChemStation to load the macro file. There are also 'compiled' .mcx macro files, and only changing the extension on a file will not produce one of these macro files, but it is not necessary for the macro to be in this format. 

    Are you trying to get this macro to work on OpenLab ChemStation edition, or on OpenLab CDS 2.x? The macros discussed in this post are only for ChemStation edition. There is some discussion in this post about preforming x,y chromatogram exports in OpenLab CDS that may be helpful if you are using that product. 

Reply
  • Hi ,

    For ChemStation the standard macro .mac file is a plain text file, so the instructions above for changing the extension on the attached file from .txt to .mac will allow ChemStation to load the macro file. There are also 'compiled' .mcx macro files, and only changing the extension on a file will not produce one of these macro files, but it is not necessary for the macro to be in this format. 

    Are you trying to get this macro to work on OpenLab ChemStation edition, or on OpenLab CDS 2.x? The macros discussed in this post are only for ChemStation edition. There is some discussion in this post about preforming x,y chromatogram exports in OpenLab CDS that may be helpful if you are using that product. 

Children
Was this helpful?