Hi,
I have racked my (limited) excel brain and cannot find a suitable way to do the following:
Convert all files within a folder from HTML (downloaded from browser) to xlsx format.
I wish the following considerations to be adhered to:
I think this below is on the right track however I don't know how to make it convert all the files... Also, this is for windows, the mac file path will be as I mentioned above.
<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit;">Sub Open_HTML_Save_XLSX() Workbooks.Open Filename:="C:\Temp\Example.html" ActiveWorkbook.SaveAs Filename:= _ "C:\Temp\Example.xlsx", FileFormat:= _ xlOpenXMLWorkbookEnd Sub</code></pre>
Any help or ideas would be more than welcome, trying to teach yourself vba isn't the easiest without help from more experienced people.
I am using excel 2011 - mac OSX (compatible with windows)
Look forward to hearing from you!
Krist
I have racked my (limited) excel brain and cannot find a suitable way to do the following:
Convert all files within a folder from HTML (downloaded from browser) to xlsx format.
I wish the following considerations to be adhered to:
- Files will always be within the same folder on my computer (Macintosh HD:Users:Krist:Documents:R7M:Planning:Locations
- Files should be saved individually as per the name of each HTML file (C09 in html format should be renamed C09 in .xlsx)
- The number of files to be converted will change on a daily basis so will have to be dynamic
I think this below is on the right track however I don't know how to make it convert all the files... Also, this is for windows, the mac file path will be as I mentioned above.
<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit;">Sub Open_HTML_Save_XLSX() Workbooks.Open Filename:="C:\Temp\Example.html" ActiveWorkbook.SaveAs Filename:= _ "C:\Temp\Example.xlsx", FileFormat:= _ xlOpenXMLWorkbookEnd Sub</code></pre>
Any help or ideas would be more than welcome, trying to teach yourself vba isn't the easiest without help from more experienced people.
I am using excel 2011 - mac OSX (compatible with windows)
Look forward to hearing from you!
Krist