| 
									
										
										
										
											2017-10-17 00:14:32 +00:00
										 |  |  | ### Optional Modules
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <details> | 
					
						
							|  |  |  |   <summary><b>Optional features</b> (click to show)</summary> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The node version automatically requires modules for additional features.  Some | 
					
						
							|  |  |  | of these modules are rather large in size and are only needed in special | 
					
						
							|  |  |  | circumstances, so they do not ship with the core.  For browser use, they must | 
					
						
							|  |  |  | be included directly: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```html | 
					
						
							|  |  |  | <!-- international support from js-codepage --> | 
					
						
							|  |  |  | <script src="dist/cpexcel.js"></script> | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | An appropriate version for each dependency is included in the dist/ directory. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The complete single-file version is generated at `dist/xlsx.full.min.js` | 
					
						
							| 
									
										
										
										
											2019-08-04 19:50:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | A slimmer build with XLSX / HTML support is generated at `dist/xlsx.mini.min.js` | 
					
						
							| 
									
										
										
										
											2017-10-17 00:14:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | Webpack and Browserify builds include optional modules by default.  Webpack can | 
					
						
							|  |  |  | be configured to remove support with `resolve.alias`: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```js | 
					
						
							|  |  |  |   /* uncomment the lines below to remove support */ | 
					
						
							|  |  |  |   resolve: { | 
					
						
							|  |  |  |     alias: { "./dist/cpexcel.js": "" } // <-- omit international support | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </details> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### ECMAScript 5 Compatibility
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Since the library uses functions like `Array#forEach`, older browsers require | 
					
						
							|  |  |  | [shims to provide missing functions](http://oss.sheetjs.com/js-xlsx/shim.js). | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To use the shim, add the shim before the script tag that loads `xlsx.js`: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```html | 
					
						
							|  |  |  | <!-- add the shim first --> | 
					
						
							| 
									
										
										
										
											2018-02-28 10:41:49 +00:00
										 |  |  | <script type="text/javascript" src="shim.min.js"></script> | 
					
						
							| 
									
										
										
										
											2017-10-17 00:14:32 +00:00
										 |  |  | <!-- after the shim is referenced, add the library --> | 
					
						
							|  |  |  | <script type="text/javascript" src="xlsx.full.min.js"></script> | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-28 10:41:49 +00:00
										 |  |  | The script also includes `IE_LoadFile` and `IE_SaveFile` for loading and saving | 
					
						
							|  |  |  | files in Internet Explorer versions 6-9.  The `xlsx.extendscript.js` script | 
					
						
							|  |  |  | bundles the shim in a format suitable for Photoshop and other Adobe products. | 
					
						
							|  |  |  | 
 |