Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data from Programmatically created Excel into SQL Server
Problem: Error when trying to query the excel file
"The Microsoft Jet database engine cannot open the file. It is already opened exclusively by another user, or you need permission to view its data." We are developing a .NET component which automates the Excel to generate some data and exports that data into SQL Server. Here are the steps for the process: 1. Opens the pre formatted Excel file with required formulas in it. 2. Inserts the data into that spreadsheet. 3. Add/Remove some formulas depending on the conditions. 4. Save the file with different name and close the file. 5. Query the saved file to insert the data in to SQL using OleDb. This process generates at least 12 files in a minute. The problem is when we try to query the file. During this process we are getting the below error: "The Microsoft Jet database engine cannot open the file. It is already opened exclusively by another user, or you need permission to view its data." I guess this problem may be occurring because the method that it created this file is still holding this file. I tried to cleanup several ways by using ReleaseComObject and GC etc. But it works well for first 3 or 4 files again starts throwing the same error. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SQL Server -- Bulk Insert from Excel to SQL Server | Excel Discussion (Misc queries) | |||
Excel 2003 Error Cannot Locate the Internet Server or Proxy Server | Excel Discussion (Misc queries) | |||
From Excel 97 Programmatically create access 97 or 2000 database and export data to. | Excel Programming | |||
Getting data from SQL Server into Excel | Excel Programming | |||
Help with data importing from txt file to excel programmatically | Excel Programming |