Save translate - Tab name - bug?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Save translate - Tab name - bug?

Jignesh Sutar
In the save translate syntax below I specify the table to saved in a tab named "A01" but the command executes saving the tab as "_A01", prefixing it with an underscore. If I were to change the tab name to "ABC01" then it works fine as expected with no prefixing underscore. Haven't quite figured out why on certain tab names it prefixes with an underscore but why would it be doing that in the first place and how do I stop it from behaving like that?
 
GET FILE='C:\Program Files (x86)\SPSS\' + 'employee data.sav'.
save translate
  /connect='dsn=excel files;dbq=c:\temp\test.xls;driverid=790;maxbuffersize=2048;pagetimeout=5;'
  /table='A01'
  /type=odbc /map /replace.
 
Many thanks in advance,
Jignesh
Reply | Threaded
Open this post in threaded view
|

Re: Save translate - Tab name - bug?

ViAnn Beadle

Maybe this is a reserved tab name in Excel. Can you manually create such a tab there?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J Sutar
Sent: Monday, March 14, 2011 2:51 AM
To: [hidden email]
Subject: Save translate - Tab name - bug?

 

In the save translate syntax below I specify the table to saved in a tab named "A01" but the command executes saving the tab as "_A01", prefixing it with an underscore. If I were to change the tab name to "ABC01" then it works fine as expected with no prefixing underscore. Haven't quite figured out why on certain tab names it prefixes with an underscore but why would it be doing that in the first place and how do I stop it from behaving like that?

 

GET FILE='C:\Program Files (x86)\SPSS\' + 'employee data.sav'.

save translate
  /connect='dsn=excel files;dbq=c:\temp\test.xls;driverid=790;maxbuffersize=2048;pagetimeout=5;'
  /table='A01'
  /type=odbc /map /replace.

 

Many thanks in advance,

Jignesh

Reply | Threaded
Open this post in threaded view
|

Re: Save translate - Tab name - bug?

Jon K Peck
Yes, A01 and similar names are legal in Excel - at least in Excel 2007.  I can't tell whether this is happening in the ODBC driver or in the SAVE TRANSLATE code, which reports the name as the one the user requested.  If you direct the output to Access instead of Excel, the table name is honored.

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        ViAnn Beadle <[hidden email]>
To:        [hidden email]
Date:        03/14/2011 08:10 AM
Subject:        Re: [SPSSX-L] Save translate - Tab name - bug?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Maybe this is a reserved tab name in Excel. Can you manually create such a tab there?
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of J Sutar
Sent:
Monday, March 14, 2011 2:51 AM
To:
[hidden email]
Subject:
Save translate - Tab name - bug?

 
In the save translate syntax below I specify the table to saved in a tab named "A01" but the command executes saving the tab as "_A01", prefixing it with an underscore. If I were to change the tab name to "ABC01" then it works fine as expected with no prefixing underscore. Haven't quite figured out why on certain tab names it prefixes with an underscore but why would it be doing that in the first place and how do I stop it from behaving like that?
 
GET FILE='C:\Program Files (x86)\SPSS\' + 'employee data.sav'.
save translate
 /connect='dsn=excel files;dbq=c:\temp\test.xls;driverid=790;maxbuffersize=2048;pagetimeout=5;'
 /table='A01'
 /type=odbc /map /replace.

 
Many thanks in advance,
Jignesh