Good idea, I'll set something up when I have time.This is interesting. I made some contributions already and will do more once I have time.
Could we have something like this but for Great People? I have seen some curious name shortages here and there.
Weird, will look into it.I noticed that the rightmost column on all maps (column DT) is wrong and seems to be a copy of column DS. It makes editing the Pacific islands more difficult.
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
var csvMenuEntries2 = [{name: "copy overlay", functionName: "copyOverlay"}];
ss.addMenu("csv", csvMenuEntries);
ss.addMenu("copy Overlay", csvMenuEntries2);
};
function saveAsCSV() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
// create a folder from the name of the spreadsheet
var folder = DriveApp.createFolder(ss.getName().toLowerCase().replace(/ /g,'_') + '_csv_' + new Date().getTime());
for (var i = 0 ; i < sheets.length ; i++) {
var sheet = sheets[i];
// append ".csv" extension to the sheet name
fileName = sheet.getName() + ".csv";
// convert all available sheet data to csv format
var csvFile = convertRangeToCsvFile_(fileName, sheet);
// create a file in the Docs List with the given name and the csv data
folder.createFile(fileName, csvFile);
}
Browser.msgBox('Files are waiting in a folder named ' + folder.getName());
}
function convertRangeToCsvFile_(csvFileName, sheet) {
// get available data range in the spreadsheet
var activeRange = sheet.getDataRange();
try {
var data = activeRange.getValues();
var csvFile = undefined;
// loop through the data in the range and build a string with the csv data
if (data.length > 1) {
var csv = "";
for (var row = 0; row < data.length; row++) {
for (var col = 0; col < data[row].length; col++) {
if (data[row][col].toString().indexOf(",") != -1) {
data[row][col] = "\"" + data[row][col] + "\"";
}
}
// join each row's columns
// add a carriage return to end of each row, except for the last one
if (row < data.length-1) {
csv += data[row].join(",") + "\r\n";
}
else {
csv += data[row];
}
}
csvFile = csv;
}
return csvFile;
}
catch(err) {
Logger.log(err);
Browser.msgBox(err);
}
}
function copyOverlay() {
var range, format, targetSheet;
var ss = SpreadsheetApp.getActiveSpreadsheet();
range = ss.getRange("A1:DT68");
var targetSheets = ss.getSheets();
for (var i = 0; i < ss.getNumSheets(); i++) {
targetSheet = targetSheets[i];
range.copyFormatToRange(targetSheet, 1, 124, 1, 68);
}
}
I'll look at the map formatting but it seems like a lot of the newspaper work. Is there a way to copy paste the formatting the without affecting the text entries?
I noticed that the rightmost column on all maps (column DT) is wrong and seems to be a copy of column DS. It makes editing the Pacific islands more difficult.
I'm now manually editing the city name maps to reflect many of the suggested changes in this thread. You can track my progress here.
None of these names appear in the Arabian city name map, they're only translations of cities founded by previous civs.How can I never aware of this thread haha. This kind of thing I was trying to create using excel spreadsheet 7 years ago, perhaps back then Google Sheet weren't this connected yet (or existed.) I'll try to check it out and help as I can when I get to my computer.
In the meantime, if it still exists, how do you view the Arabian Tell el Dab'a etc (literally just burial mound/archeological site). Would you rather have it updated to its nearest major city (in this case, perhaps Domyat)? At least it'll give Arabia proper city names that aren't just excavation site in 3000BC scenario.
The first post already has links to some Google sheets. The whole file had to be split into three separate sheets.Can this be transferred on Excel Online or Google Sheets? It makes editing easier, plus those who want to contribute can do so. They can be exported to CSV files for incorporation into Python, anyway.
Alright, I just started commenting. I'm mostly working on Southeast Asia region name, commenting on Indonesia, Arab, Tibet, English.None of these names appear in the Arabian city name map, they're only translations of cities founded by previous civs.