Jump to content

Recommended Posts

Posted

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

Posted

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]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...