Akshay07 Posted December 26, 2009 Posted December 26, 2009 Hi all, Here is the piece of code: $sPath = "C:\test\"&$sTime ; $sTime format is yy.mm.dd-hh.mm.ss ; Run("notepad.exe") ; Sleep(1000) ; Send($sPath) This is just for testing purpose, to check that $sPath string is correct $oExcel = _ExcelBookOpen("C:\test\ExcelTest.xls") _ExcelBookSaveAs($oExcel, $sPath, "xls") But the file is saved without any extension at all. According to the help, the format to use is _ExcelBookSaveAs($oExcel, $sFilePath, $sType = "xls"). Any clue? Thanks
ichigo325 Posted December 27, 2009 Posted December 27, 2009 Hi, i can't test your code because i don't have Excel.. But i think i know how to do it.. Maybe you can use this simple code: _ExcelBookSaveAs($oExcel, $sPath & $Filename & ".xls", "xls") [size="2"][font="Lucida Sans Unicode"][b][/b][/font][/size]
Akshay07 Posted December 29, 2009 Author Posted December 29, 2009 Thanks, it works. This is weird because it does not correspond to what the help says. Anyway, as long as it works, I am happy
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