Add new variables to existing SAV file

Mar 22, 2013 at 5:18 PM
Hello,

I'm creating a new SAV file, adding variables to it, and then adding cases. That's all working great.

I'm also able to open the file later on and add new data to it (using SPSSDataDocument.Open with SpssFileAccess set to Append.

What I need to be able to do though is to open an existing SPSS Sav file and add new variables to it.

Is there any way of doing this with the library?

Thanks in advance!

Regards,

Ken...
Mar 23, 2013 at 12:11 PM
Hi,

Sadly, the only solution I've found is the one you suggest - to create a new SAV file, copy the structure from the old file,appending the new variables, committing the dictionary and then running an append copying the values from the old SAV file into the new one, setting the new variables to whatever they need to be.

If someone out there knows another approach I'm similarly interested.

Ian