Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Trouble importing an Excel spreadsheet when the desired sheet is not the first sheet


From   Clyde B Schechter <clyde.schechter@einstein.yu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Trouble importing an Excel spreadsheet when the desired sheet is not the first sheet
Date   Thu, 1 Nov 2012 16:38:20 +0000

Aaron Kirkman is having trouble importing a worksheet from an Excel file using -import excel, sheet(...)- when the worksheet he wants is not the first in the file.

It may not turn out to be the problem he is facing, but I have had a similar experience when the name of the worksheet in the Excel file contains a leading or trailing blank or an embedded non-printing character.  

Probably the most robust solution is to rename the worksheet, if that is OK in his context.  If not, double clicking on the tab at the bottom of the worksheet will highlight the worksheet name.  That can then be copied to the clipboard and pasted into the -sheet()- option _between quotes._  That has worked for me in the past.

Hope this helps.

Clyde Schechter
Dept. of Family & Social Medicine
Albert Einstein College of Medicine
Bronx, NY, USA


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index