excel - How to get workbook filename of opened XML file? -
I tried to see it on the internet, but it did not get any solution.
I'm exploring a way to get a file named XML. My code opens in such a way:
Workbook. OpenXML filename: = pliczek, load option: = xlXmlLoadImportToList
variable pliczek
is the path of the file and when the code is executed the new file, for example Sheet1 < / Code> is opened. I want to know the file name - I want to execute some code on it, but there is no indication of how to get that name.
It is risky to try to activate the next window,
Works for
sub-tester () dim wb as workbook set wb = workbooks. OpenXML (filename: = "C: \ _stuff \ test.exml", _loadopation: = xlxmlload importlist list) debug Print wb.Name, wb.Sheets (1) .name ending sub
Comments
Post a Comment