[정보] Excel CSV - Number cell format

2013.07.11 00:40

Taedong Yun 조회 수:10031

http://stackoverflow.com/questions/137359/excel-csv-number-cell-format


I produce a report as an CSV file. When I try to open the file in Excel, it makes an assumption about the data type based on the contents of the cell, and reformats it accordingly.

For example, if the CSV file contains

...,005,...

Then Excel shows it as 5. Is there a way to override this and display 005?

I would prefer to do something to the file itself, so that the user could just double-click on the CSV file to open it.

I use Excel 2003.

share|improve this question

There isn’t an easy way to control the formatting Excel applies when opening a .csv file. However listed below are three approaches that might help.

My preference is the first option.

Option 1 – Change the data in the file

You could change the data in the .csv file as follows ...,=”005”,... This will be displayed in Excel as ...,005,...

Excel will have kept the data as a formula, but copying the column and using paste special values will get rid of the formula but retain the formatting

Option 2 – Format the data

If it is simply a format issue and all your data in that column has a three digits length. Then open the data in Excel and then format the column containing the data with this custom format 000

Option 3 – Change the file extension to .dif (Data interchange format)

Change the file extension and use the file import wizard to control the formats. Files with a .dif extension are automatically opened by Excel when double clicked on.

Step by step:

  • Change the file extension from .csv to .dif
  • Double click on the file to open it in Excel.
  • The 'File Import Wizard' will be launched.
  • Set the 'File type' to 'Delimited' and click on the 'Next' button.
  • Under Delimiters, tick 'Comma' and click on the 'Next' button.
  • Click on each column of your data that is displayed and select a 'Column data format'. The column with the value '005' should be formatted as 'Text'.
  • Click on the finish button, the file will be opened by Excel with the formats that you have specified.

댓글 0

목록
번호 제목 글쓴이 날짜 조회 수
공지 [정보] Noteworthy Composer(NWC) 사용법 & 팁 Taedong Yun 2012.05.07 66578
공지 [정보] 이메일 설정 Taedong Yun 2011.07.09 40408
공지 [정보] 중요 리눅스 커맨드 (계속 업데이트) Taedong Yun 2010.05.01 69743
공지 [자료] 시외버스 & 5005번 시간표 Taedong Yun 2005.03.11 59023
공지 [자료] Token Taedong Yun 2005.03.24 55173
공지 이름 대신 뜨는 이미지박스 신청 요령~ Taedong Yun 2004.02.25 54999
공지 - 의문사항 노트 Taedong Yun 2007.09.21 56447
공지 - 관심이 가는 책들 Taedong Yun 2005.01.15 52837
433 [정보] CSS 색상표 Taedong Yun 2015.09.26 469
432 [정보] 안드로이드 - 저장된 WIFI 비밀번호 보기 Taedong Yun 2014.08.17 31605
431 [정보] Cisco Anyconnect VPN & Jabber Download Taedong Yun 2014.06.11 10382
430 [정보] 리눅스 서버 / DB 백업 Taedong Yun 2014.04.09 9240
429 [정보] Verizon LG G2 root, wifi tether, etc. Taedong Yun 2014.03.29 12063
428 [정보] 카카오톡 백업 & 복원 Taedong Yun 2014.03.28 17185
427 [정보] Windows 사용자 이름 변경 Taedong Yun 2014.03.03 10331
426 [정보] Dropbox 아이콘이 보이지 않을 경우 해결법 Taedong Yun 2013.12.24 8566
425 [정보] Thunderbird 언어 변경 Taedong Yun 2013.12.03 13307
424 [정보] Adobe Photoshop 포토샵 한글판 언어 영문으로 바꾸기 Taedong Yun 2013.11.20 8376
423 [정보] VLC 플레이어 한글 자막 설정 Taedong Yun 2013.11.07 11222
» [정보] Excel CSV - Number cell format Taedong Yun 2013.07.11 10031
421 [정보] 윈도우 시작 시 AsusSetup Log파일 lost 메시지 뜰 때 관리법 Taedong Yun 2013.03.08 11717
420 [정보] Mac OS X 설정 정보 Taedong Yun 2013.01.08 10641
419 [정보] Windows 에서 바탕화면 및 사용자 폴더 변경볍 Taedong Yun 2012.05.04 11685
418 [정보] 우분투 12.04 에서 한영키와 alt키가 같이 눌리는 문제 Taedong Yun 2012.04.28 31023
417 [정보] ubuntu 11.x 버전에서 sage 실행 시 _md5 에러 해결책 Taedong Yun 2012.04.22 11020
416 [정보] Thinkpad keyboard beep disable Taedong Yun 2012.04.20 11635
415 [정보] 안드로이드 폰에 MIT certificate 저장하기 Taedong Yun 2012.01.07 10415