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

st: Paste Clipboard Data and long variable names

From   Garry Anderson <>
Subject   st: Paste Clipboard Data and long variable names
Date   Mon, 17 Aug 2009 11:34:45 +1000

Dear Statalist,

I am copying/pasting data from Excel into the Data Editor in Windows.
The first row has variable names. Stata 11 pops up a window labelled
Paste Clipboard Data
and asks
Is the first row data or variable names?
The first row on the clipboard contains values that can be used as valid
variable names
 * Treat first row as data
 * Treat first row as variable names

I select the second option and variable names are created. This popup
only appears if all variable names have less than 34 characters. If any
variable name has more than 33 characters Stata pastes the variable
names and data into the Data Editor without showing the popup, however
it regards the first row that contains the variable names as data and
creates variables called var1, var2, var3, etc.

Previous versions of Stata did not ask any questions and always created
variable names when they appeared as the first row, regardless of the
number of characters in their name length. It appears that in Stata 11
one cannot have variable names that are longer than 33 characters and
have Stata create these variable names when copying/pasting data.

For example, first row of variable names and data
This is the first row that contains variable names    column2    column3
1                                                      2          3
4                                                      5          6
7                                                      8          9

This creates four rows of string data, with the variables named var1,
var2 and var3.

Is there a method to prevent this popup and to always use the variable
names in row 1?

I am using Excel 2003, SP3 and Windows XP SP3.

Cheers, Garry

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index