Hi everyone,
i have an Excel template stored in “WE Template” table and I want to create an Excel file, based on this template, whithout saving it to the disc. I.e. just in memory of computer.
Current code works like:
-
Get template from table;
-
Save to the disc;
-
Open Excel template from disc and fill with the data.
// Get the template from source table:
WETemplate.GET(COPYSTR(CurrReport.OBJECTID(FALSE),8),WETemplate.Type::Excel);
WETemplate.CALCFIELDS(“Template Store”);
// Save to the disc
WETemplate.“Template Store”.EXPORT(FileName, FALSE);
// Create an Excel Workbook for work:
xlBook := xlApp.Workbooks._Open(FileName);
I want it to work like:
-
Get template from table;
-
Create Excel document, based on this template;
-
Fill it with data, format;
-
Export to PDF (xlBook.ExportAsFixedFormat(0,‘C:\test.pdf’)
-
Close Excel without saving.
Thansk for an Ideas