Help using Base SAS procedures

Append with Export

Reply
Occasional Contributor
Posts: 11

Append with Export

hi would like to export a file to a certain sheet in excel, but instead of replacing the data, i would like to append.

how do i do this?
Super Contributor
Posts: 291

Re: Append with Export

One way would be first import the data into SAS, append the new data to the SAS dataset and then export the new larger SAS dataset to excel - replacing the original excel file.

This does keep the process within the confines of proc import and export.
Super User
Posts: 3,112

Re: Append with Export

Try this test:

LIBNAME WrkBk EXCEL "My Workbook.xls" VER=2000;

DATA WrkBk.class;
SET sashelp.class;
RUN;

LIBNAME WrkBk CLEAR;

LIBNAME WrkBk EXCEL "My Workbook.xls" SCAN_TEXT=NO;

PROC APPEND BASE=WrkBk.class
DATA=sashelp.class;
RUN;
LIBNAME WrkBk CLEAR;
Ask a Question
Discussion stats
  • 2 replies
  • 160 views
  • 0 likes
  • 3 in conversation