ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Microsoft Office Application Help - Excel Help forum > Excel 2007 Help

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-24-2008, 11:13 AM
yawnzzzz yawnzzzz is offline
Forum Contributor
 
Join Date: 03 Jun 2008
Posts: 124
yawnzzzz is an unknown quantity at this point
Reading/Writing to Excel 2007 Document

I currently have an application that read/writes to an Excel 2003 file, and I'd like to update to it to 2007.

To use excel 2007 xlsx files, I downloaded the office 2007 ACE driver from:

http://www.microsoft.com/downloads/d...displaylang=en


I installed the new ACE/Excel12 OLEDB driver and created a linked server on SQL with the command:

sp_addlinkedserver 'FileXLE', '', 'Microsoft.ACE.OLEDB.12.0', 'C:\Inetpub\ftproot\zipupdate\Filedxf.xlsx', NULL, 'Excel 12.0'


I was able to read the new excel file as before, but if I tried to update it then it threw this error:

Server: Msg 7330, Level 16, State 2, Line 1
Could not fetch a row from OLE DB provider 'Microsoft.ACE.OLEDB.12.0'.
[OLE/DB provider returned message: Bookmark is invalid.]
OLE DB error trace [OLE/DB Provider 'Microsoft.ACE.OLEDB.12.0' IRowset::GetNextRows returned 0x80040e0e].

I have not been able to find any answers on google.

I have tried changing a few of the driver settings which looked as if they may be relevant such as: 'Level zero only', 'Non transacted updates', 'Index as access path' but no luck.

Any suggestions would be appreciated.
Reply With Quote
  #2  
Old 10-10-2008, 02:35 PM
yawnzzzz yawnzzzz is offline
Forum Contributor
 
Join Date: 03 Jun 2008
Posts: 124
yawnzzzz is an unknown quantity at this point
Still looking for help.

If anyone has done something similar with the xlsx format, than I would appreciate code samples as well. Thanks.
Reply With Quote
  #3  
Old 10-11-2008, 04:57 AM
royUK's Avatar
royUK royUK is offline
Forums Administrator
 
Join Date: 18 Nov 2003
Location: Lincolnshire,UK
Posts: 7,603
royUK is a jewel in the rough
Are you trying to updte a 2007 workbook without having Excel 2007 installed?
__________________
Hope that helps.

RoyUK
--------
If you are pleased with a member's answer then use the Scales icon to rate it

For Excel consulting, free examples and tutorials visit my site
Check out the free Excel Toolbar

New members please read & follow the Forum Rules

Remember to mark your questions Solved and rate the answer(s)

Where to copy the code to

Code Tags: Make your code easier for us to read
Reply With Quote
  #4  
Old 11-12-2008, 10:52 AM
yawnzzzz yawnzzzz is offline
Forum Contributor
 
Join Date: 03 Jun 2008
Posts: 124
yawnzzzz is an unknown quantity at this point
It's a .NET 1.1 web application, so Excel 2007 would not be installed on the server. It's currently taking data out of a SQL database and writing it to an Excel 2003 file. I'd like to convert it to write to an Excel 2007 file, so I can expand the columns.
Reply With Quote
  #5  
Old 11-14-2008, 10:04 AM
yawnzzzz yawnzzzz is offline
Forum Contributor
 
Join Date: 03 Jun 2008
Posts: 124
yawnzzzz is an unknown quantity at this point
There's a new twist to this.

If I query the table, it works:
Code:
SELECT * FROM FILEXLE...Sheet1$
If I try to insert into the table, it works:
Code:
INSERT INTO FILEXLE...Sheet1$ (PRICE1)
SELECT PRICE1
FROM FILEXLE...Sheet1$
WHERE PRICE1 = 158
But if I try to update existing records, it fails:
Code:
UPDATE FILEXLE...Sheet1$
	SET PRICE1 = '100'
	WHERE SKU = 'B09L'
I get this error message:
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "FILEXLE" returned message "Bookmark is invalid.".
Msg 7346, Level 16, State 2, Line 1
Cannot get the data of the row from the OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "FILEXLE".
Reply With Quote
Reply

Bookmarks

New topics in Excel 2007 Help


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integration of Excel 2007 and Visio 2007 wilro85 Excel General 1 07-03-2008 01:40 PM
DialogSheet in Excel 2007 hashem_te Excel 2007 Help 2 06-02-2008 05:56 AM
Associating .xls files with Excel 2003 when Excel 2007 is installed rocket_ron Excel Miscellaneous 1 03-12-2008 10:14 AM
Excel 2007 and linked in charts to Powerpoint 2007 Sionos Excel Charting 0 02-14-2008 12:26 PM
New Workbooks - Excel 2007 Lotus123 Excel Miscellaneous 4 08-23-2007 06:03 PM


All times are GMT -4. The time now is 01:11 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0