The SAS Output Delivery System and reporting techniques

export data to Excel template

Posts: 60

export data to Excel template

I need to export dataset to already defined Excel template. Template will contain only one sheet but with objects like graphs referring to fixed range (refreshing obcjets is not needed - I can do that in Excel later).

Target Excel file should contain many copies of this sheet (with different data depending on data I will be exporting - eg. one sheet per client type).

Is there a simple way to do that?

Respected Advisor
Posts: 3,124

Re: export data to Excel template

You have posted a rather complicated scenario.  If you already have pre-formated excel files as a template, the usual approach would be using DDE. However, DDE does not duplicate 'sheet', rather , DDE just transfers data to your formated spread sheet.

That may leave 'ODS excelxp tagset' as the only viable option for your need of multi-sheets. However, this tagset has to define your format every time you run it and does not use pre-formated excel spread sheet, though it may mimic the format that you want.



Posts: 60

Re: export data to Excel template

Correct me if I'm wrong but through DDE you can run any Excel macro which means you CAN copy worksheets. The problem is that when I try to run DDE I get error: ERROR: Physical file does not exist, excel|system.

So I'm looking for some other solution.

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation