ilona Posted September 4, 2019 Share Posted September 4, 2019 Hello , please help me with an autoit script for Excel file "save as" where the file name is range ("D2") from Activesheet something like $filename = $Workbook.Activesheet.Range("D2") _Excel_BookSaveAs($Workbook,"C:\desktop\$filename.xls" Thank you!!! Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 4, 2019 Share Posted September 4, 2019 (edited) Where is your problem? Use _Excel_RangeRead to get the path and then the save function. Edited September 4, 2019 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ilona Posted September 4, 2019 Author Share Posted September 4, 2019 Thank You! Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 4, 2019 Share Posted September 4, 2019 2 minutes ago, ilona said: Thank You! No problem. Easy one and glad I could help. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ilona Posted September 4, 2019 Author Share Posted September 4, 2019 Sorry I can't put the path in the file name. The file is saved a ($sResult.xls ).I cant create the link with the excel range read Thank you #include <excel.au3> Local $oExcel = ObjGet("","Excel.Application") if NOT @error then for $Workbook in $oExcel.Workbooks Local $sResult = _Excel_RangeRead($Workbook, Default, "D2",3) _Excel_BookSaveAs($Workbook,"C:\desktop\($sResult).xls" ) next _Excel_Close($oExcel,true,true) EndIf Link to comment Share on other sites More sharing options...
Nine Posted September 4, 2019 Share Posted September 4, 2019 Please use this tool when you are posting code. Try this : _Excel_BookSaveAs($Workbook,"C:\desktop\" & $sResult & ".xls") “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ilona Posted September 4, 2019 Author Share Posted September 4, 2019 It works !!! Many, many thanks!!!!! 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