Controlling where you post Excel data

(Originally posted by Laura on 6/13/2006)

When i send my data to excel, it doesn't start at the top of the sheet, but instead writes it further down apparently where it last left off. So i'm stuck with a large amount of blank cells heading my data.



  • (Originally posted by Dean on 6/13/2006)

    You have control of where to place the data into an Excel spreadsheet through the Export Options. If you want it to start at cell A1 each time, choose -

    Position data set at:
    Row: 1 Col: 1
    Increment position for next data set by:
    Row: 0 Col: 0


  • (Originally posted by CTMurray on 6/21/2006)

    I would like to hop in as well. I need to use a macro to open a specific Excel spreadsheet. It is working now but opens a new workbook or will add data to my desired workbook if it is already open. Can't figure out how to get it to open a specific file. Here is what I have tried, including making the file name even more detailed - but to no avail.

    ret = IpDde(DDE_SET, "append", "2")
    ret = IpDde(DDE_SET, "row", "2")
    ret = IpDde(DDE_SET, "col", "1")
    ret = IpDde(DDE_SET, "topic", "[Cumberland template.xls]Sheet1")
    ret = IpDde(DDE_SET, "target", "C:\Srccode\o2kpsr1\Disk1\PFiles\MSOffice\Office\EXCEL.EXE")
    ret = IpBlbSaveData("", S_HEADER+S_Y_AXIS+S_STATS+S_DDE)

    Any thoughts


  • (Originally posted by Chris Tully on 6/21/2006)

    Please take a look at Solution #703 on the Solutions Zone. This is a macro that demonstrates controlling Excel from an Image-Pro macro via COM, rather than DDE. In particular, it deomstrates putting the data in specific cells, charting data, and working with two workbooks at the same time. This method is slightly more complicated, since you have to extract the data you want to send to Excel from Image-Pro into arrays in your macro, and then send it over to Excel. However, in return for the added complexity, you gain incredible amounts of flexibility and power - you can start with a completely blank spreadsheet, and populate it with the necessary data AND formulae.

Sign In or Register to comment.