Excel – Paste to Excel from clipboard (plain text) : Can I make certain cells to be formatted “as such”

copy/pasteformattingmicrosoft excel

when preparing table data as text to be copied to Excel through clipboard, is it possible to have certain cells unformatted? (If possible, without changing Excel settings or doing a special paste).

In a simple standard case I have one row of "column headers" (text) and rest of the rows contain numeric data

foo bar asdf
1   2   3

Now, the problem is that sometimes I got headers containing date stuff that Excel decides to format as date (or numbers sometimes). I'd like Excel to do no formatting for those

When entering the text to the cell by hand, I can do this by adding a single quote (') before the cell content. But if I copy the following to clipboard and paste it:

foo '1  asdf
1   2   3

then I get '1 to the screen. I'm not sure if there is some solution for this but if somebody has something, that would be nice =)

Why I'm asking this: My context is that I got a program that copies table data (as text) to clipboard (to be transformed to Excel).

EDIT: Some clarifications:

  • I'd like to do something to have the cells in the first row not being formatted
    • Clarified the actual question also
  • The optimum would be something such that the end user doing the paste wouldn't need to do any special paste
    • I'm not sure if this is possible, if that is the case I should find some way to export data in a more custom way but that is another story belonging to stackoverflow.com.

br,
Touko

Best Answer

After copying the table to clipboard you can use Text Import Wizard under Paste Menu in Excel 2007/2010. If you're using Office 2003 or earlier you can import table from an external text file, for details see this article.

At the 3rd step of Text Import Wizard you have the option to specify the column data format. Choose the column you want to change and select appropriate formatting.

enter image description here

Related Question