Message-ID: <969291804.10249.1711719078701.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10248_1608466320.1711719078701" ------=_Part_10248_1608466320.1711719078701 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Preprocessing refers to using the ExcelApplica= tion object to modify an existing partial template file before passing the = template file to ExcelTemplate for importing data.
=20Postprocessing refers to using the ExcelApplic= ation object to modify a workbook that has already been populated with data= .
=20ExcelTemplate was designed for importing large amounts of data into Exce= l workbooks. ExcelApplication was designed for the purpose of creating more= dynamic content, but as a consequence it is more memory intensive. To mini= mize the amount of memory that's being consumed when using ExcelApplication= , we recommend:
=20For example, you can create a Workbook with ExcelApplication and insert = the formatting, charts, or dynamic content that you want to appear in the f= inal workbook, along with data markers where you want the data to appear. Y= ou can then open this Workbook with ExcelTemplate to populate the data.
= =20Postprocessing should only be done when there are changes that need to b= e made based on the data that was imported, or when preprocessing is not av= ailable.
=20An example of formatting changes that depend on the data is using AutoFi= tWidth() on a column of data. AutoFitWidth needs to have the data in the co= lumn in order to calculate the column width. Calling AutoFitWidth before th= e data is imported will not have the desired effect.
=20An example of when preprocessing is not available is combining multiple = existing files into a single workbook. This is common when using OfficeWrit= er for Reporting Services because the only way to access the reports with E= xcelApplication is after they have already been rendered with Reporting Ser= vices and are full of imported data.
=20In general, it's best to avoid post-processing as a report with all of i= ts imported data can be much larger than the original template file. This m= eans that ExcelApplication may consume a much larger amount of memory compa= red to the same operation performed on the original template. There is more= information on how to reduce memory usage in Best Practices with Large Reports.