Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create new workbook and new worksheet and close. Worksheet not sav
Hi,
I have scenario that users may give a filename and sheetname and both are not exiting. So I will create workbook by Workbook.SaveAs(newWorkbookFullFileName, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode. xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value); and then sheet by Sheet.SaveAs(worksheet.Workbook.Name, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value); After that, users may close the appliation and I will do: if (!Workbook.Saved) { Workbook.Save(); } Workbook.Close(true, Missing.Value, Missing.Value); App.Quit(); But when I use Excel to check the content of the file, the sheet supposes to be created as "SheetTest" is not there in the newly created workbook. Am I missing anything? Thanks Patrick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
want to create a link to another worksheet in another workbook | Excel Worksheet Functions | |||
Create new workbook and new worksheet and close. Worksheet not sav | Excel Worksheet Functions | |||
create a workbook or worksheet listing totals from different workb | Excel Discussion (Misc queries) | |||
Copy & paste cells fr open worksheet then close the worksheet | Excel Programming | |||
How to sum value from master worksheet taking value from other close worksheet | Excel Programming |