Link to home
Start Free TrialLog in
Avatar of rgrguric
rgrguric

asked on

How To Rename A Spreadsheet And Save The Worbook To A Specific File Location

I have created and opened a new Excel spreadsheet using COM in Visual Studio 2010 C++.  How can I rename a sheet in the workbook and how can I save the workbook to a specific location?  I made this worth 500 because I put 2 questions in here but I'm pretty sure they are easy answers.  I just don't know the correct method to use or where to look to find a list of methods available through COM for Excel.

XL.CreateInstance(L"Excel.Application");
XL->Visible = true;
XL->Workbooks->Add();
Excel::_WorkbookPtr p_workbook=XL->ActiveWorkbook;
Excel::_WorksheetPtr pSheet = p_workbook->ActiveSheet;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rgrguric
rgrguric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgrguric
rgrguric

ASKER

No one else posted any comments so I work on this all weekend and came up with a solution!