ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Issue updating XLS using ADO (https://www.excelbanter.com/excel-programming/275958-re-issue-updating-xls-using-ado.html)

onedaywhen

Issue updating XLS using ADO
 
The bug discussed in Q293828 relates to updating Excel using an ADO
recordset. If you are updating a single cell you probably don't need
to use a recordset object. Try using an UPDATE SQL statement e.g.

UPDATE [Sheet1$] SET Surname='Doh' WHERE RefID=90

Execute the statement using the Connection/Command object's Execute
method.

You said '"Open' the updated XLS in a new MS-EXCEL session". Does this
mean you already have the XLS open in an existing session? If so you
should also be aware of the memory leak bug, article Q319998). I've
certainly had problems with Excel crashing due to the target workbook
being open.

"RAV" wrote in message ...
Hi,

I need to update a single cell in an XLS file from an ASP
page. The requirement is to have this happen on the Web
Server without having to install MSOffice (or MSExcel) on
the server. Upon browsing MSDN documentation I came across
the ability of updating XLS (MS-EXCEL) files from ASP
using ADO's OLEDB Jet driver. When I try this it works
(PSS ID number in MSDN for the article is Q278973) but the
issue is that once the XLS is updated and ASP script
finish's execution, trying to open the updated XLS file,
either thru ASP or from the MS-Excel app., results in a
crash. MSDN article with PSS ID number Q293828 talks
about a bug when the above approach is used but the
resolution suggested in MSDN (which is to "Open" the
updated XLS in a new MS-EXCEL session and saving it again)
doesnt work as MS-Excel crashes whenever I try to open the
updated XLS file.

Can someone please tell me if this approach of updating
XLS file from an ASP page is a reliable one, if yes are
there any service packs (MDAC etc) that should be applied
to resolve the problem described above.

Any help on this will be much appreciated as I am badly in
need of a quick solution to this problem.

Thanks in advance,
Regards
Rajesh



All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com