![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Excel Sheet Change Topic Summary: Created On: 26-Jun-2007 19:08 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Here is a way to get the sheet by sheet number. However, be aware that the second sheet in a workbook may not necessarily correspond to the sheet number 2. If there are macros there can be things called modules (don't ask me what these are exactly) which exist in the Sheets collection. So be sure to check that the name of the sheet does not contain the word "Module". You must first get a handle to the workbook. | |
![]() |
|
When writing to an excel file from doors, I currently am only able to get the active sheet using |
|
![]() |
|
![]() |
|
Here is a way to get the sheet by sheet number. However, be aware that the second sheet in a workbook may not necessarily correspond to the sheet number 2. If there are macros there can be things called modules (don't ask me what these are exactly) which exist in the Sheets collection. So be sure to check that the name of the sheet does not contain the word "Module".
You must first get a handle to the workbook. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
quote: What is the value of the constants cPropertySheets and cMethodActivate? |
|
![]() |
|
![]() |
|
"Sheets" and "Activate"
![]() Do a search for my Excel functions post. It includes an ole.inc file with all the ones that comes in the DOORS ole.inc file plus many others I have added. Those two are in the DOORS ole.inc file though. Just do: #include <utils/ole.inc> ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 27-Jun-2007 at 14:04 by David Pechacek |
|
![]() |
|
![]() |
|
Yeah i just figured out what they were, although my ole.inc doesn't contain those two (perhaps its an old version). Thanks for the help! Much appreciated.
|
|
![]() |
|
![]() |
|
OK maybe I added those two.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Thanks David, did me a favour too. I played around with this to work out how to delete a sheet also. Dont have the code right here, but I can post it tomorrow if its not already in your archive.
------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
Actually I don't have a function written to delete a sheet. Its not something I do but I wouldn't mind having it.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
My main reason for writing the delete sheet function was to get rid of the 3 default sheets that are present when you create a new workbook. That way only my new named sheets are present in the end file.
Note that this is best done at the end, as excel does not like it if you have a workbook with NO worksheets. In the included code I have passed the name of the sheet to be deleted as a string, but you could also pass the sheet number as an integer, as shown in the get sheet example above, it works well both ways. ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
You could always just rename the sheets automatically created by Excel.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Excel Sheet Change
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.