HI,
use SysExcelWorkbooks Open to open an existing file. Workbooks add will always add a new workbook to the existing instance of excel.
Mit freundlichen Grüßen / Best regards / Med venlig hilsen
Jesper Jørgensen
NMS - Entwicklung Axapta
arvato systems Technologies GmbH
An der Autobahn 18
33311 Gütersloh
http://www.arvato-systems.de <BLOCKED::http://www.arvato-systems.de/>
E-Mail: [EMAIL PROTECTED]
Phone: 05242 / 40 80 54
Fax: 05242 / 40 80 40
Mobile: 0172 / 571 03 34
____________________________________________________________________________________________
"Der Inhalt dieser Nachricht oder eventueller Anlagen ist vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Bitte stellen Sie sicher, dass die Information in dieser Nachricht ausschließlich an die adressierten Personen gelangt. Sollte diese Nachricht versehentlich an Sie gesendet worden sein, dann informieren Sie bitte umgehend den Absender und löschen Sie die Nachricht. Vielen Dank."
"The information in this e-mail and any attachments is confidential. The information must only be held in areas that have controlled and limited access to the addressed persons. If this e-mail has been sent to you in error, please immediately notify the sender and delete the e-mail. Thanks."
_____
Von: anettemalmberg [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 29. März 2005 13:48
An: development-axapta@yahoogroups.com
Betreff: [development-axapta] Open a excelfile
Hi,
I try to open an excel-document from a table ProdRoute via menuItem
(Display) atached to a form but I've only got a copy of the
Excelfile
and not the original file. I think the reason for that is
codestring >>> sysExcelWorkbook = sysExcelWorkbooks.add
(COMVariant);<<<<, but I am not sure.
This is my init() method on a form
void init()
{
Args callerArgs;
ProdRoute ProdRoute;
FileNameOpen File2Display;
COMVariant COMVariant;
SysExcelApplication sysExcelApplication;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorksheet sysExcelWorksheet;
super();
COMVariant = new COMVariant();
if (element.args())
{
callerArgs = element.args();
if (callerArgs.dataset() == tablenum(ProdRoute))
{
ProdRoute = callerArgs.record();
File2Display = ProdRoute.File2display();
}
}
sysExcelApplication = SysExcelApplication::construct();
sysExcelApplication.visible(true);
sysExcelWorkbooks = sysExcelApplication.workbooks();
COMVariant.bStr(File2Display);
sysExcelWorkbook = sysExcelWorkbooks.add(COMVariant);
sysExcelWorkbook.saved(true);
element.close();
}
}
Thanks!
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129a8epd8/M=298184.6018725.7038619.3001176/D=groups/S=1705006764:HM/EXP=1112183554/A=2593423/R=0/SIG=11el9gslf/*http:/www.netflix.com/Default?mqso=60190075> click here
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=:HM/A=2593423/rand=791956484>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service.
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.