Hi Jim -
Yes I have seen this behavior where writing data to a preformatted
worksheet alters the cell formats within the targeted range. My kludge
was to write data to a hidden worksheet (the SAS libname Excel engine
doesn't care if the target range is on a hidden worksheet) and then have
the cells on the formatted page read the data from the hidden data page.
DDS Data Extraction
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Monday, November 17, 2008 4:00 PM
Subject: Libname excel named range report formatting woes
I'm creating reports using libname excel and writing to a named range.
I have preformatted my columns in excel. I have date columns, time
columns and others. It looks like the first missing value causes all
subsequent values in a column to use a different/wrong format. For
example, the time columns start using a date format, the date columns
start using a 4-digit year instead of 2-digit year.
Anyone have experience with this and know of a work-around?