I have a data set consisting of variables id, condition, response. I have the following syntax to generate an Excel file, say, for data cleaning:
compute tab=9.
formats tab (pib).
write outfile='Directory\outfile.xls' / " if id = " tab id tab " and condition = " tab condition tab " response = ".
execute.
The variable tab is created to separate the outputs (text, variables) in the write outfile command into different cells in Excel file.
I run the syntax on one computer (SPSS 23, 64-bit) and it works as expected, like this:
|if id = | 1 | and condition = | 2 |response =|
Each | represent a cell.
However, I run on another computer (SPSS 23, 32-bit) and it doesn't work. It particular, it dumps all fields from the write outfile into one single cell. It looks like this
|if id = 1 and condition = 2 response =|
Can you tell what may go wrong? I suspect it has something to do with variable tab. And what does pib format mean?
UPDATE: I try to write outfile in text format and the tab works OK.
write outfile='Directory\outfile.txt' / " if id = " tab id tab " and condition = " tab condition tab " response = ".