I am working with XLSM files that for unknown reasons are crashing Excel when certain users open them. The template for these workbooks was originally created in XL2007, and has been tweaked and added to over the years. We are now using Office 365.
I have code to obtain data from the workbooks without opening the files, but that code depends on having the name of the worksheet. I found code to get the worksheet names here: Search file . Unfortunately, that code returns 'way too many names! The workbook I'm testing on has 31 worksheets, but I'm returning over 4900 names!! It looks like there's a "worksheet name" generated for each named range and filtered name, plus internal XL constants (like PrintRange and such) for each worksheet.
If I unzip the file, I see the xl/worksheets/ directory has only the 31 sheets called out as XML files. Even so, the XML only has the worksheet "codeName" ("Sheet13") - the tab label is nowhere to be found in the entire XML.
Is there a reliable method to extract only the worksheet tab labels from a file? Or to use the referenced code, but filter out everything that is not a valid sheet tab name?
I have code to obtain data from the workbooks without opening the files, but that code depends on having the name of the worksheet. I found code to get the worksheet names here: Search file . Unfortunately, that code returns 'way too many names! The workbook I'm testing on has 31 worksheets, but I'm returning over 4900 names!! It looks like there's a "worksheet name" generated for each named range and filtered name, plus internal XL constants (like PrintRange and such) for each worksheet.
If I unzip the file, I see the xl/worksheets/ directory has only the 31 sheets called out as XML files. Even so, the XML only has the worksheet "codeName" ("Sheet13") - the tab label is nowhere to be found in the entire XML.
Is there a reliable method to extract only the worksheet tab labels from a file? Or to use the referenced code, but filter out everything that is not a valid sheet tab name?