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

Copying values to Excel

I simply want to put a value (text) into an Excel cell, I guess I have to copy the value to the cipboard and then paste it into a cell, but i can't work out the details.  Can anyone give me the code for this, or is there a tutorial somewhere?

Best Answers

  • I need to put values in a specified cells. Either into the current open worksheet, or into a specified sheet. 
  • Answer ✓
    Paul,

    You can use ExportToExcel command as in this example:

        Public Sub ExcelTest
            With  Mediacy.Automation.Measure.Data.ExportCommands.ExportToExcel(Nothing)
                .AbsolutePosition=New System.Drawing.Point(4,2)'X/Y position, Column/Row in the active sheet
                .Run("My text to Excel","")
            End With
        End Sub
    

    Yuri

Answers

  • Paul,

    The easiest way would be to print your text to the Output window and then export that window to Excel. Will it work for you? Or you want specify Excel sheet, cell address, text and send it to Excel?

    Yuri
  • That's just what I need - thanks
Sign In or Register to comment.