Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel File Corruption

Status
Not open for further replies.

scking

Programmer
Jan 8, 2001
1,263
US
I am linking an Excel file using the wizard in an Access 2002 database. The wizard creates an Excel 5.0 connection to the linked file. When I read the file using DAO there are instances where I need to get a computer generated index number to normalize the files with the database. This is not a difficult thing to do but then I also need to write the computer generated number to a cell in the Excel file. After the cell is modified and I attempt to open the file it is corrupted. Various cell values are moved to diffferent columns and I get a 'Data may be lost' error when opening. I would think that I should be able to write to an Excel file with a version greater than 5.0 with no problems but am apparently wrong. Can anyone explain why I am getting corruption and possibly propose a solution? ----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
Could you make the excel spreadsheet part of the access database and dispense with the link altogether?

You could consider adding vba to the spreadsheet that exports the data within to the database and if necessary, imports new data from the database. If you attached the code to the open and close events of the spreadsheet you might get away with it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top