How to prevent numbers to get converted to dates in Excel?

前端 未结 5 1773
醉梦人生
醉梦人生 2021-01-14 07:24

I\'m trying to copy paste numberic data from database to Excel. In the database the decimal separator is dot (.) and in my Excel the decimal separator is comma (,). Now when

相关标签:
5条回答
  • 2021-01-14 08:05

    I use Notepad++ for this task: copy your data to notepad++ replace the "." with "," and copy it to excel.

    0 讨论(0)
  • 2021-01-14 08:12

    Microsoft advices to format cells as text and paste values after that:
    https://support.office.com/en-us/article/stop-automatically-changing-numbers-to-dates-452bd2db-cc96-47d1-81e4-72cec11c4ed8

    0 讨论(0)
  • 2021-01-14 08:18

    Yeah, this is a real pain sometimes - my quick solution is to use cells formatted as text.

    Here is how it works:

    • copy your numbers with the .
    • select a column or some cells
    • change cell-format to text
    • now paste-special (or paste-contents) as unformatted/plain text
    • now replace . with ,
    • now change format back to number or default

    You can put this in some macro of course.

    However, I think there might - or at least should be - a better solution.

    But as a quickie, this works too ;)

    0 讨论(0)
  • 2021-01-14 08:21

    First mark the cells that you're going to paste to. Right click, "Format" and then select "Number".

    Now right click to paste, and select "Match Destination Formatting"

    Your text will now be pasted as numbers again :)

    0 讨论(0)
  • 2021-01-14 08:21
    1. Open Microsoft Word
    2. Paste your data from web
    3. Open excel
    4. Format all as text
    5. copy all from word (Ctr+A)
    6. Paste special in Excel as text vuala!
    0 讨论(0)
提交回复
热议问题