开发者

How to programmatically save an OPEN Excel Document

I have UI tests. When the UI tests finish, they open the result files in an Excel document (Excel 2007 is installed on the test environment) - but the problem is that the excel document is not saved anywhere on the computer. They exist only when the AutoRecover feature saves the temporary files as a .xar file, so this is useless to us.

We use a C# .NET program开发者_如何学运维 to launch the UI tests (and do a bunch of other things), so I'm looking to see if it's possible to save this OPENED excel document programmatically.

Is that possible?

Thanks


This may help you How to: Save Workbooks

Example

This example creates a new workbook, prompts the user for a file name, and then saves the workbook.

Set NewBook = Workbooks.Add
Do
    fName = Application.GetSaveAsFilename
Loop Until fName <> False
NewBook.SaveAs Filename:=fName
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜