Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default changing existing spreadsheet

Hello, I have not done anything like this so....

It's possible to programmatically (in .NET) open an *.xls file, make changes
(specifically rename worksheets) and save the file/changes correct?

Thanks in advance,
Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default changing existing spreadsheet

Jim,

Try something like

Dim WB As Excel.Workbook
WB = XL.Workbooks.Open("H:\Test\BookName.xls")
WB.Worksheets("OldSheetName").Name = "NewSheetName"
WB.Close True

where XL is your instance of the Excel Application.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jim" wrote in message
...
Hello, I have not done anything like this so....

It's possible to programmatically (in .NET) open an *.xls file,
make changes
(specifically rename worksheets) and save the file/changes
correct?

Thanks in advance,
Jim



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the number of columns within existing column(s) tkdmom Excel Discussion (Misc queries) 1 November 18th 09 09:33 PM
Excel 2007 Changing Existing Formulas tm Excel Discussion (Misc queries) 1 November 20th 07 07:55 PM
download existing spreadsheets into another existing spreadsheet lbierer Excel Discussion (Misc queries) 2 September 24th 06 08:36 PM
Changing case on text in an existing spreadsheet christy d Excel Discussion (Misc queries) 1 April 19th 06 12:02 AM
Changing language of an existing sheet Cimbian Excel Discussion (Misc queries) 4 October 28th 05 07:15 PM


All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"