07-02-2014 02:28 PM
I am using DDE to write a report to XL. When I write out a text field from a SAS file that contains more than one word (e.g. Company A), each word ends up in a different column. When I put quotes around the text field (e.g. "Company A"), the space between the words ends up being removed (e.g. CompanyA).
Does anyone know a work-around for this?
My code is attached; the XL "template" can be any blank workbook. The sample code uses the sashelp.cars file.
07-02-2014 04:13 PM
But it is interesting what happens when I paste the same data here. Has me thinking that there's some Excel option at work...
|Acura||RSX Type S 2dr|
|Acura||3.5 RL 4dr|
|Acura||3.5 RL w/Navigation 4dr|
|Acura||NSX coupe 2dr manual S|
|Audi||A4 1.8T 4dr|
|Audi||A41.8T convertible 2dr|
|Audi||A4 3.0 4dr|
|Audi||A4 3.0 Quattro 4dr manual|
07-02-2014 05:00 PM
I suspect that you real problem is some setting in Excel. For example in the past I have seen Excel automatically convert text that tried to import or paste into columns using the delimiter that I last used to convert using the TEXT_TO_COLUMN functionality. So instead of pasting on column of strings it split the strings into multiple cells. I am sure it thought it was being "helpful" but it was a pain to get it to stop.
Need further help from the community? Please ask a new question.