25

Using Excel you can import data from a text file with a wizard available at -> Data -> From text.

Is there a way of using the same wizard to import data coming from the clipboard without having to create an empty text file, pasting the contents there and then using the wizard?

0

2 Answers 2

27

Text to columns (in data tab) have almost the same functionality than your "import from text file has".

You can split the text to columns by fixed length or at separators, select data type for each column...

1
  • My data was tab separated already but I needed to stop Excel from formatting the data (removing leading zeroes and changing large numbers). Using the "Use Text Import Wizard" allows me to enforce formatting before Excel. Aug 1, 2023 at 23:15
17

Alternatively, if you have the text data on your clipboard, you can Use Text Import Wizard...  (I've confirmed that this works for Excel 2010+; not sure about older versions.)

Screenshot from Excel 2017

4
  • 1
    But this seems to provide the exact same functionality as "Text to Columns".   (It might be one less mouse click.) Mar 25, 2019 at 17:08
  • 9
    I find this option doesn't always show up, depending on the formatting of the source (e.g. copy/paste from webpages). This can be worked-around by pasting into notepad or similar, and then copying again from there. Ugly, but it works.
    – Eddy
    Oct 7, 2020 at 15:20
  • This is perfect for copying SQL results into Excel! Thank you! No more leading zeroes being deleted! :) Aug 1, 2023 at 21:39
  • What you say is true only sometimes. Sometimes when you copy, say, from an HTML document on the internet, the Text Import Wizard is not a option given to you. In its place you have "Refreshable Web Query..." This doesn't provide the same functions as text import wizard. For some reason, perhaps a non-standard column delimiter character, a regular paste will give you a single column of numbers where each row is transposed to a column, and then all the resultant columns are concatenated together into one very long row. In fact, I haven't found the easy way to get around this, yet.
    – Gerry Harp
    Nov 2, 2023 at 1:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .