If you run the code below, it creates two sheets both named Sheet1. Obviously if you saved the file to disk and tried to open it, Excel would complain about the duplicate sheet names. It is possible it may also cause problems with other spreadsheet functions that rely on sheet name, rather than index.
<cfset sheet = SpreadSheetNew() /> <cfset SpreadSheetCreateSheet(sheet) /> <cfset info = SpreadSheetInfo(sheet)/> <cfdump var="#info#" label="Duplicate sheet names" />
Now I suspect most people prefer to provide their own (more descriptive) sheet names, in which case the issue does not apply. But in case you do choose to use this feature, just be aware of this "gotcha".
No comments:
Post a Comment