vidaLL Posted August 28, 2013 Share Posted August 28, 2013 (edited) Hello guys, I need a help with the follow command : #include <WindowsConstants.au3> #include <Excel.au3> #include <IE.au3> Func _Main() Local $Input_CurrentUserName Global $sExcelFile = "C:\Users\ "& @UserName"\Desktop\teste.xls" ; <== Add the name of the Excel file here and your User Global $oExcel = _ExcelBookOpen($sExcelFile) Global $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "site here"); EndFunc I have the need to open a file in the desktop which have a fixed name. My problem is that each computer has a different code User. I would like this script to work on any computer. Grateful to all. Edited August 28, 2013 by vidaLL Link to comment Share on other sites More sharing options...
Solution dragan Posted August 28, 2013 Solution Share Posted August 28, 2013 by using @DesktopDir ? Link to comment Share on other sites More sharing options...
vidaLL Posted August 28, 2013 Author Share Posted August 28, 2013 Solved my friend. thanks for your help. Local $sFilePath1 = @DesktopDir & "\Pasta2.xls" ;Global $sExcelFile = @DesktopDir & "\Pasta2.xls" ; <== Add the name of the Excel file here and your User Local $oExcel = _ExcelBookOpen($sFilePath1) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now