Tags: des style color Io OS for file SP on When a file is returned from a browser, you must specify the contenttype. the following values are for office2007: "Application/vnd. openxmlformats-officedocument.wordprocessingml.template" (for. dotx files) "Application/vnd. openxmlformats-officedocument.presentationml.presentation" (for. pptx files) "Application/vnd. open
Recently, you have uploaded documents for office 2010, such as pptx, on the website. You cannot download the documents in the background management.
The solution is to add the MIME type to the website.
Add Extension Method (illustration ):
Go to the site corresponding to IIS → right-click [properties → HTTP header → MIME type → new → extension | Type
The following figure uses the word. docx extension as an example.. Docx application/vnd.openxmlformats-officedocument.wordprocessingml.d
byte read/write
4. read/write Excel BIFF format
5. Recognize and read common records in Excel BIFF, such as RowRecord, StyleRecord, and ExtendedFormatRecord.
6. You can set the height, width, and style of cells.
7. Some Excel built-in functions, such as sum, countif, and computing symbol, can be called.
8. Supports embedded printing settings in the generated XLS, such as horizontal/vertical printing, scaling, and used paper.
NPOI 2.0 consists of SS, HPSF, DDF, HSSF, XWPF, XSSF, OpenXml4Net, and
Jquery validate verifies the File Upload type
Because jquery validate is used by the project development to verify the uploaded files, it is found that the built-in verification function is rich and easy to use. However, some MIME files are not frequently used and are not easy to view.
For this example, see w3cschool.
The possible MINIEType types are as follows:
. Dotx, application/vnd. openxmlformats-officedocument.wordprocessingml.template. Docx, a
.rar 'on the server ');//
File to be downloaded, including the path
Common MIME types. Doc application/msword. Docx application/vnd.openxmlformats-officedocument.wordprocessingml.doc ument. Rtf application/rtf. Xls application/vnd. ms-excel application/x-excel. Xlsx application/vnd. openxmlformats-officedocument.spreadsheetml.sheet. Ppt application/vnd. ms-powerpoint. Pptx application/vnd. openxmlformats
NPOI2.0 puts OOXML code in a separate DLL. before using it, make sure that the following DLLNPOI. dllNPOI. OOXML. dllNPOI. OpenXml4Net. dllNPOI. OpenXmlFormats. dll release is referenced --------------------------------------------------------------------------------------------------------
NPOI 2.0 puts OOXML code in a separate DLL. before using it, make sure that the following dll npoi. dll NPOI. OOXML. dll NPOI. OpenXml4Net. dll NPOI.
-type: application/octet-stream'); // The output type. select the corresponding type based on the MIME table provided below.Header ('content-Disposition: attachment; filename= ..rar "'); // download the display nameReadfile('file name .rar 'on the server ');//
File to be downloaded, including the path
Common MIME types. Doc application/msword. Docx application/vnd.openxmlformats-officedocument.wordprocessingml.doc ument. Rtf application/rtf. Xls application/vnd. ms-excel application/x-exc
(dotIndex, fName. length (). toLowerCase ();If (end = "") return type;// Find the corresponding MIME type in the MIME-object type matching table.For (int I = 0; I If (end. equals (MIME_MapTable [I] [0])Type = MIME_MapTable [I] [1];}Return type;}MIME_MapTable is a String array of the MIME type corresponding to the suffix of all files:Java code // {Suffix, MIME type}{". 3gp", "video/3gpp "},{". Apk", "application/vnd. android. package-archive "},{". Asf", "video/x-ms-asf "},{". Avi", "video/x-msv
There is only one, that is, npoi.openxml4net, which is transplanted from POI's subproject openxml4j, which functions like npoi.poifs, except that it operates in the ooxml format. This module is consistent with the System.packaging functionality provided by Microsoft, except that System.packaging supports. NET 3.0, which supports. NET 2.0.
Npoi. Modules included in the OpenXmlFormats.DLL
There is also only one, that is, Openxmlformats, which defines t
Biff format 5, identify and read common record in Excel Biff, such as Rowrecord, Stylerecord, Extendedformatrecord 6, Support to set cell height, width, style, etc. 7, support the call to some Excel built-in functions, such as SUM, COUNTIF and calculation symbol 8, support in the generated XLS embedded printing settings, such as Horizontal/portrait printing, scaling, use of paper. Npoi 2.0 consists mainly of SS, HPSF, DDF, HSSF, XWPF, XSSF, Openxml4net, Ope
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.