반응형
Excel 파일의 올바른 콘텐츠 유형은 무엇입니까?
클릭했을 때 엑셀로 열리거나, 데스크탑에 저장되지 않거나, 브라우저에 내장된 상태로 열렸으면 합니다.물론 모든 것이 각 사용자에 대해 어떻게 구성되느냐에 따라 달라집니다만, 대부분의 경우 이를 달성하기 위해 가장 적합한 Content-Type 및 기타 설정은 무엇일까요?
BIFF .xls 파일의 경우
application/vnd.ms-excel
Excel2007 이후의 .xlsx 파일인 경우
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.ms-excel
vnd class
/ 벤더 고유- http://en.wikipedia.org/wiki/Microsoft_Excel#File_formats
주의해 주십시오.file.getContentType
에서는 필요한 application/vnd.openxmlformats-officedocument.parametml 대신 application/octet-stream을 출력할 수도 있습니다.이미 열려 있는 파일을 업로드하려고 할 때 시트.
언급URL : https://stackoverflow.com/questions/2937465/what-is-correct-content-type-for-excel-files
반응형
'code' 카테고리의 다른 글
C#을 사용하여 폴더에서 모든 파일 이름 가져오기 (0) | 2023.04.23 |
---|---|
WPF/MVVM Light Toolkit을 사용한 창 닫기 이벤트 처리 (0) | 2023.04.23 |
ENV 변수 또는 기본값을 사용하여 Makefile 변수 정의 (0) | 2023.04.23 |
세로 구분 기호를 추가하는 방법 (0) | 2023.04.23 |
msdeploy를 통한 Azure Web App 전개 오류 - ERROR_INSUFFICE_A CCESS_TO_SITE_FOLDER (0) | 2023.04.23 |