| 
									
										
										
										
											2018-03-29 04:31:36 +00:00
										 |  |  | /* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */ | 
					
						
							| 
									
										
										
										
											2017-09-12 20:02:06 +00:00
										 |  |  | /* from the electron quick-start */ | 
					
						
							|  |  |  | var electron = require('electron'); | 
					
						
							|  |  |  | var XLSX = require('xlsx'); | 
					
						
							|  |  |  | var app = electron.app; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var win = null; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function createWindow() { | 
					
						
							| 
									
										
										
										
											2020-06-28 07:22:46 +00:00
										 |  |  | 	if (win) return; | 
					
						
							|  |  |  | 	win = new electron.BrowserWindow({ | 
					
						
							|  |  |  | 		width: 800, height: 600, | 
					
						
							|  |  |  | 		webPreferences: { | 
					
						
							|  |  |  | 			nodeIntegration: true, | 
					
						
							|  |  |  | 			enableRemoteModule: true | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2017-09-12 20:02:06 +00:00
										 |  |  | 	win.loadURL("file://" + __dirname + "/index.html"); | 
					
						
							|  |  |  | 	win.webContents.openDevTools(); | 
					
						
							| 
									
										
										
										
											2020-06-28 07:22:46 +00:00
										 |  |  | 	win.on('closed', function () { win = null; }); | 
					
						
							| 
									
										
										
										
											2017-09-12 20:02:06 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-06-28 07:22:46 +00:00
										 |  |  | if (app.setAboutPanelOptions) app.setAboutPanelOptions({ applicationName: 'sheetjs-electron', applicationVersion: "XLSX " + XLSX.version, copyright: "(C) 2017-present SheetJS LLC" }); | 
					
						
							|  |  |  | app.on('open-file', function () { console.log(arguments); }); | 
					
						
							| 
									
										
										
										
											2017-09-12 20:02:06 +00:00
										 |  |  | app.on('ready', createWindow); | 
					
						
							|  |  |  | app.on('activate', createWindow); | 
					
						
							| 
									
										
										
										
											2020-06-28 07:22:46 +00:00
										 |  |  | app.on('window-all-closed', function () { if (process.platform !== 'darwin') app.quit(); }); |