I have an Excel VBA script that runs automatically to login to customer's webpage and downloads two .xls files:
from the client's site and saves them to the downloads folder (OneDrive for Business) and renames them.
I need to build to a flow that:
Has anyone done something like this? I am new to Flow.
Hi @fhtech ,
You could try to understand the function of the existing Excel Online in MS Flow according to the topic of Excel online connector in the forum or the Online doc.
Please check this online doc:
According to your description, you could achieve the corresponding requirements through the following actions.
I have updated my VBA for Excel script to convert the .xls file to the .xlsx format. Haven't been successful at creating the table before the save. Got the range, but the ActiveSheet.ListObjects.Add(xlSrcRange, Range(Cells(1, 1), Cells(lRow, lCol)), , xlYes).Name = "Table1" is failing, perhaps a hierarchy issue. Below is the code, just not sure where to put that code; have tried a couple of places.
Sub CovertToXlsx(ByVal vFilePath)
iSeconds = 20
Set xlApp = CreateObject("excel.application")
With xlApp.Workbooks.Open(vFilePath) 'open file
'Set a freeze under column 1 so that the header is always present at the top
xlApp.ActiveWindow.FreezePanes = True
'Get Range Info from A1:A1 to SlRow:SlCol
lRow = .Cells(Rows.Count, "A").End(xlUp).Row
lCol = .Cells(1, Columns.Count).End(xlToLeft).Column
'WScript.Sleep iSeconds * 1000 '20 * 1 second
xlApp.DisplayAlerts = False
'.SaveAs Left(vFilePath, Len(vFilePath) - 4) & ".xlsx", -4143 '-4143=xlWorkbookNormal
.SaveAs Left(vFilePath, Len(vFilePath) - 4) & ".xlsx", 51
.Close True 'save and close
xlApp.DisplayAlerts = True
Set xlApp = Nothing
Nevertheless, I will try the flow suggestions you mentioned.