Hi @dona56558947, yes that can be done. I've written a script that attempts it. The script tries to load a csv file (currently looks in the same folder as the script file, but you can change this of course) called "Document Titles.csv" (you can change this, too). Document Titles.csv looks something like this:

You can make this in a spreadsheet or text editor. If there are commas in the Document Titles, you can use a tab character as the delimiter rather than the comma I used. The script doesn't properly parse CSV, it just splits it up using a delimiter, which is currently every tab or comma but you can change this.
The script loads this CSV, then it looks to see if any of those documents are open in Indesign and, if they are, will set their document titles and save/close them. It will not close any documents that aren't matched in the CSV file.
Let me know if this is going to work for you.
- Mark
/**
* Reads a CSV file where each line has two fields:
* (1) document name, including extension, and
* (2) document title.
* If the document named (1) is open, then set its
* XMP document title to (2) and save/close it.
* It will look for the csvFile in the same folder
* as this script.
* @author m1b
* @discussion https://community.adobe.com/t5/indesign-discussions/set-document-title-from-entry-in-spreadsheet/m-p/14276685
*/
(function () {
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
// the csv file name
var csvFileName = 'Document Titles.csv',
// the same folder as this script
csvFolderPath = File($.fileName).parent + '/',
// fields delimiter (comma or tab)
csvDelimiter = /[,\t]/g,
// read the file
csv = readTextFile(csvFolderPath + csvFileName);
if (!csv)
return alert('Could not read file "' + csvFileName + '".');
// divide into rows
csv = csv.split('\n');
var counter = 0,
fields,
docName,
doc;
// loop over each row:
csvRowLoop:
for (var i = 0, len = csv.length; i < len; i++) {
fields = csv[i].split(csvDelimiter)
docName = fields[0];
docTitle = fields[1];
if (!(docName && docTitle))
continue csvRowLoop;
doc = app.documents.itemByName(docName);
if (!doc.isValid)
continue csvRowLoop;
// if document found in csv file is open,
// set its title and close/save it
doc.metadataPreferences.documentTitle = docTitle;
doc.close(SaveOptions.YES)
counter++
}
alert('Set ' + counter + ' document titles.');
})();
/**
* Returns contents of text file.
* @param {File|String} f - the file or path.
* @returns {String}
*/
function readTextFile(f) {
if (f.constructor.name == 'String')
f = File(f);
if (!f || !f.exists)
return;
f.open('r');
var data = f.read();
f.close();
return data;
};