I'm working with SpreadsheetNew and SpreadsheetCreateSheet, populating from a query object.
I've experienced something that I've never seen, before. If you have a Spreadsheet object and try to add a sheet to it using a name that already exists, CF will abort. I finally got it to email the reason to me. "The workbook already contains a sheet of this name."
However, I did not expect for there to be "http://www.example.com" AND "https://www.example.com", so when CF creates "www.example.com", populates the sheet, then tries to create "www.example.com", again, it just stops.
I am not seeing any CF Spreadsheet(blahblahblah) commands that will check to see if a sheet already exists.
I will try to modify the query so that both standard and encrypted FQDNs fall into the same group, but just in case.. can anyone think of a way to check if a particular sheet name already exists within a Spreadsheet object??
^ _ ^
Well, I did kind of find an answer to my question. You can use SpreadsheetInfo(obj) to get information about the spreadsheet object, including a column called "SHEETNAMES". It's a comma-delimited list of the names of currently existing spreadsheets. I will iterate through that and just make that the active sheet instead of creating it if the name already exists.
^ _ ^