Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Save Issue
All,
I use ADO to modify data in Excel, when I open the excel file, the data in is showed updated, but when I use another program to visit it, the data is not updated. When I open and then close the file manually, the excel prompt me to save. if I choose save, the data got by another program is right, if not save, the data is still keep the original value. Can someone give me the suggestion on how to avoid this issue. Some demo code will be highly appreciated, thanks, Albert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Save Issue
My guess is that you set the query to update your data when you open the
file. That would explain the behavior you describe: the update only takes place when Excel opens the file because the macro is an Excel feature. Any other app that uses the file only reads the saved data. So once you save the data it is there to be used by the other apps, but if it is "old" data that is saved, that is what the other apps have to work with. But when you open the file in Excel, you see the new data. Don't know how to avoid this. It is a limitation to the approach you are using; Excel is not really set up to give you a "live" link between an external database and 3rd party apps; that is what ODBC is for - but the other apps have to support import via ODBC for that to work. -- - K Dales "AlbertGe" wrote: All, I use ADO to modify data in Excel, when I open the excel file, the data in is showed updated, but when I use another program to visit it, the data is not updated. When I open and then close the file manually, the excel prompt me to save. if I choose save, the data got by another program is right, if not save, the data is still keep the original value. Can someone give me the suggestion on how to avoid this issue. Some demo code will be highly appreciated, thanks, Albert |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Save Issue
For my case, two application use the same approach to visit excel file, the
difference is one application write excel file then close, the other only do read. two all use oledb. I guess, may be I need to save it after change data use recordset, but I do not know how to realize it in ADO. Anyway, than Dales for your kind comments, Albert "K Dales" дÈëÓʼþ ... My guess is that you set the query to update your data when you open the file. That would explain the behavior you describe: the update only takes place when Excel opens the file because the macro is an Excel feature. Any other app that uses the file only reads the saved data. So once you save the data it is there to be used by the other apps, but if it is "old" data that is saved, that is what the other apps have to work with. But when you open the file in Excel, you see the new data. Don't know how to avoid this. It is a limitation to the approach you are using; Excel is not really set up to give you a "live" link between an external database and 3rd party apps; that is what ODBC is for - but the other apps have to support import via ODBC for that to work. -- - K Dales "AlbertGe" wrote: All, I use ADO to modify data in Excel, when I open the excel file, the data in is showed updated, but when I use another program to visit it, the data is not updated. When I open and then close the file manually, the excel prompt me to save. if I choose save, the data got by another program is right, if not save, the data is still keep the original value. Can someone give me the suggestion on how to avoid this issue. Some demo code will be highly appreciated, thanks, Albert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
save as issue | Excel Discussion (Misc queries) | |||
when excel save as csv,double quotes in an cell issue | Excel Discussion (Misc queries) | |||
File Save/Save As Issue | Setting up and Configuration of Excel | |||
Save As Authentication Issue From ASP.NET | Excel Discussion (Misc queries) | |||
Save As issue | Excel Programming |