This works:
*** sample data for illustration-- use your own.
DATA LIST FREE /longstr (a300) otherstr (a300).
BEGIN DATA
aaaa zzzzz
bbbb ZZZZZ
END DATA.
WRITE OUTFILE='C:\Program Files\SPSS\test.txt'
/longstr ',' otherstr
.
EXECUTE.
Open the file in excel using the text wizard to identify the delimiter.
Change the file location and variables names in the WRITE command to
suit your needs.
Note that WRITE OUTFILE works differently than SAVE TRANSLATE. There
will be no separator in the file from WRITE unless you add one. The
text-- ',' -- is used to add a comma separator between the variables in
this example.
--jim
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Ali Korkmaz
Sent: Tuesday, July 10, 2007 11:24 AM
To:
[hidden email]
Subject: saving long strings to excel from spss 14
Hi,
I am trying to convert an SPSS file which has long string (longer than
255
characters) to Excel. I did this in the past but now I am getting
repeated errors (such as microsoft visual C++ runtime library assertion
failed and gives more specification). When I was able to save it, the
string is truncated to 255 characters only. I tried different versions
of Excel 2 and 8. I used syntax and interface, nothing changed. Saving
it to dat file doesn't help b/c the string has some tabs and when
importing from dat file, tabs create new lines.
Thanks for any suggestions,
--Ali