void ShowExportGUI() { if (GUILayout.Button("Export")) { string folderPath = EditorUtility.OpenFolderPanel("Select folder to save to.", "", ""); if (availableFileFormats[chosenFileFormat] == csvFileEnding) { string fullPath = folderPath + "/" + exportFileName + csvFileEnding; CSVParser.Write(fullPath, CSVParser.GetDelimiter(delimiter), new List <string>(LanguageHandlerEditor.LoadLanguageFile(null, true).Keys), LanguageHandlerEditor.LoadAllLanguageFiles()); Debug.Log("Exported CSV file to " + fullPath); this.Close(); } else if (availableFileFormats[chosenFileFormat] == xlsFileEnding) { string fullPath = folderPath + "/" + exportFileName + xlsFileEnding; XLSExporter.Write(fullPath, "Languages", new List <string>(LanguageHandlerEditor.LoadLanguageFile(null, true).Keys), LanguageHandlerEditor.LoadAllLanguageFiles()); Debug.Log("Exported XLS file to " + fullPath); this.Close(); } else { Debug.LogError("BulkUpdateWindow: Unsupported export format!"); } } }