PRB: Updating DAO Recordset from Excel Increases File Size (254634)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- The DAO SDK 3.0
- The DAO SDK 3.5
- The DAO SDK 3.6
This article was previously published under Q254634 SYMPTOMS
When you open a Data Access Object (DAO) recordset from an Excel spreadsheet and update a record, the size of the Excel file increases dramatically when the recordset is closed.
CAUSE
Jet rewrites an alternate form for the data to each cell in the worksheet; in cells that appear to contain data and those that do not. This alternate form causes the file size to inflate.
RESOLUTION
Use OLE Automation to open an instance of the workbook prior to opening the recordset. If the workbook file is already open by using OLE Automation, DAO builds the recordset using OLE Automation instead of using Jet. When the recordset is updated and saved, the Excel file size is approximately the same as before the recordset was opened.
Modification Type: | Major | Last Reviewed: | 1/11/2001 |
---|
Keywords: | kbDSupport kbprb KB254634 |
---|
|