Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I prevent sas truncating at 256 characters?Outputting to Excel

Status
Not open for further replies.

Katie6

Programmer
Jun 12, 2007
58
GB
Hi there,
I've written some code to output my sas dataset as an xml file so that it can be opened in Excel. I have used ODS. The problem is that some of the lines of xml code generated by SAS truncate at 256 characters.

e.g.
Code:
<Cell ss:StyleID="RowHeader" ss:Index="2"><Data ss:Type="String">[b]This bit of data is very long. It is very important that it is very long. The length of this data cannot be changed[/b]</Data></C

The above line of code ends like this: </C
It should end like this: </Cell>.
This error in the sas-generated code means that I cannot open the xml file in Excel.

I cannot change the number of characters in the dataset (corresponding to the bold words above), so can anyone suggest how I might be able to get round this problem?

Many thanks,

Katie

 
Declare a variable with a length that is long enough to accomodate, then put the whole string into that... I should think that would work.
You may need to use an option which gets rid of the "longer than 256" warning as well...
Code:
options noquotelenmax;


Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top