Home Image-Pro Automation (Macros, Apps, Reports)

Is it possible to name and save the excel file produced by the data collector from a macro?

I have written a few macros to measure and collect data from an image batch. I want to be able to export the measurements to excel without having to jump into excel to name and save the file.

Any input would be highly appreciated.

Best Answer

  • Answer ✓
    Hi David,

    You can save XLS file directly from Data Collector table toolbar (Export | Text file) and this operation is macro recordable. Here is how the recorded macro looks:

        Public Function SaveDCToFile() As SimpleScript
            SaveDCToFile = New SimpleScript
    
            With Measure.Data.Collector.TableCommands.SaveAsText(SaveDCToFile)
                .UseStatistics = False
                .FileName = ThisApplication.Path(mcPathType.mcptWriteableDocuments) & "MyData.xls"
                .Run()
            End With
    
        End Function
    

    Yuri

Answers

Sign In or Register to comment.