Is
template a possibility?
This
is how you make a new file based on a template:
static
void Excel(Args _args)
{
SysExcelApplication sysExcelApplication;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorksheet sysExcelWorksheet;
SysExcelRange sysExcelRange;
COM range;
COM characters;
{
SysExcelApplication sysExcelApplication;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorksheet sysExcelWorksheet;
SysExcelRange sysExcelRange;
COM range;
COM characters;
COMVariant
COMVariant;
;
;
sysExcelApplication =
SysExcelApplication::construct();
sysExcelApplication.visible(true);
sysExcelWorkbooks = sysExcelApplication.workbooks();
COMVariant = new COMVariant();
COMVariant.bStr(<templateFilename>);
sysExcelWorkbook = sysExcelWorkbooks.add(COMVariant);
sysExcelWorksheet = sysExcelApplication.activeSheet();
sysExcelRange = sysExcelWorksheet.range('A1');
range = sysExcelRange.comObject();
characters = range.characters(1);
characters.insert('Test');
sysExcelApplication.visible(true);
sysExcelWorkbooks = sysExcelApplication.workbooks();
COMVariant = new COMVariant();
COMVariant.bStr(<templateFilename>);
sysExcelWorkbook = sysExcelWorkbooks.add(COMVariant);
sysExcelWorksheet = sysExcelApplication.activeSheet();
sysExcelRange = sysExcelWorksheet.range('A1');
range = sysExcelRange.comObject();
characters = range.characters(1);
characters.insert('Test');
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 29. januar 2004 08:41
To: [EMAIL PROTECTED]
Subject: RE: [development-axapta] Creating Excel with X++Hi Aknes,Do you know how I can add in formatting to individual cells? For example changing the color, font type/style etc.-----Original Message-----
From: Aksnes Eva [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 3:27 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [development-axapta] Creating Excel with X++Ex: A simple job. Puts 'Test' in A1 (Not sure the bookmark is set correctly, but still..)static void Excel(Args _args)
{
SysExcelApplication sysExcelApplication;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorksheet sysExcelWorksheet;
SysExcelRange sysExcelRange;
COM range;
COM characters;
;sysExcelApplication = SysExcelApplication::construct();
sysExcelApplication.visible(true);
sysExcelWorkbooks = sysExcelApplication.workbooks();
sysExcelWorkbook = sysExcelWorkbooks.add();
sysExcelWorksheet = sysExcelApplication.activeSheet();
sysExcelRange = sysExcelWorksheet.range('A1');
range = sysExcelRange.comObject();
characters = range.characters(1);
characters.insert('Test');}-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 29. januar 2004 04:28
To: [EMAIL PROTECTED]
Subject: [development-axapta] Creating Excel with X++Hi all,I hope to learn more about creating excel worksheets using X++. I am familiar with creating worksheets and populating cells with values. However I wish to know more about using styles or other formating features available.There isn't much information I could get on the Axapta Developer Guide. I have also tried looking at existing classes that creates excel such as the SysExcelTemplateWizard class, but it doesn't provide much help.I would appreciate very much if you could share any resources with me on this or could point me to places that provide such information.TIA,Charles
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.
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.
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.
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.

