![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to open an existing excel file through dxl Topic Summary: Created On: 11-Sep-2007 16:27 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Can any one suggest me how to open an existing excel file from my local drive through dxl script.
|
|
![]() |
|
![]() |
|
Subrojyoti,
The code below should get you started. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
Hi Kevin, Thanks for your help..... It worked with slight modification FileName instead of File. Regards, |
|
![]() |
|
![]() |
|
Looking for some help with this. I tried Kevin's script above as is and making the "FileName" modification Subrojyoti suggested. However a blank Excel file opens, I tried printing the result of the oleMethod and get the following error:
Problem with OLE Argument names. Running DOORS 8.1 and Excel 2003, any ideas? ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
My bad guys!
The Excel Application Object doesn't open, the Workbooks object opens...so the last three lines should be: ------------------------- Kevin Murphy http://www.baselinesinc.com |
|
![]() |
|
![]() |
|
Hm, not sure if this thread is about what I am looking for ...
I want to open an excel file to export a module into it with the module name set as the filename of the excel. Using the code above I don't see where I have to assign the module name to filename ... can somebody help? Karl |
|
![]() |
|
![]() |
|
Here is a function I use.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
David,
thanks for your response. but, leaves me clueless. I don't know what to do with it. Karl |
|
![]() |
|
![]() |
|
You have your OleAutoObj handle to your workbook and a OleAutoArgs variable called args(which stores info to pass to the OLE function call such as the file name). For me the workbook handle and args variable are globals (I rewrote my excel functions to not use globals. It ended up being slower for an export). So you just pass that function a file name(with directory path) and it will save the workbook as it.
If you don't use globals, pass your workbook handle to the function as well, create the OleAutoArgs variable inside it, and then perform the action. Basically you're just calling the Save As option in Excel. Be sure to delete the OleAutoArgs variable when the function is done. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.