#1   Report Post  
Rob Oldfield
 
Posts: n/a
Default Retrieving formulae

Hi,

I'm trying to write something in .Net which will look at an Excel file and
be able to read the formualae within it. I'd prefer not to do this via
automation and I'm currently trying it via an ADO connection. My connection
string is along the lines of

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=h:\excelsearch\1.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1"

....but that is returning the value of a cell, instead of the underlying
formula. Does anyone know if I can change the connection string in some way
so that I get the formulae, or have any bright ideas on another way of
getting at the data?

Many thanks for any ideas.


  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default

I am not certain if this is of any value to you, but a way of getting a
formula instead of the resultant value is to put an apostropy in front of the
equals sign to convert it to text. If this can be done to the spreadsheet
cells prior to capturing them it might be a solution.
--
Gary''s Student


"Rob Oldfield" wrote:

Hi,

I'm trying to write something in .Net which will look at an Excel file and
be able to read the formualae within it. I'd prefer not to do this via
automation and I'm currently trying it via an ADO connection. My connection
string is along the lines of

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=h:\excelsearch\1.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1"

....but that is returning the value of a cell, instead of the underlying
formula. Does anyone know if I can change the connection string in some way
so that I get the formulae, or have any bright ideas on another way of
getting at the data?

Many thanks for any ideas.



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

I don't think ADO will give you access to the formula, only the value. ADO
is a data access technology, and looks at all sources as a set of data.

If you want to get at the formula, you should use automation.

--
HTH

Bob Phillips

"Rob Oldfield" wrote in message
...
Hi,

I'm trying to write something in .Net which will look at an Excel file and
be able to read the formualae within it. I'd prefer not to do this via
automation and I'm currently trying it via an ADO connection. My

connection
string is along the lines of

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=h:\excelsearch\1.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1"

...but that is returning the value of a cell, instead of the underlying
formula. Does anyone know if I can change the connection string in some

way
so that I get the formulae, or have any bright ideas on another way of
getting at the data?

Many thanks for any ideas.




  #4   Report Post  
Rob Oldfield
 
Posts: n/a
Default

Yes, I was afraid that that would be the answer I got. Thanks anyway.


"Bob Phillips" wrote in message
...
I don't think ADO will give you access to the formula, only the value. ADO
is a data access technology, and looks at all sources as a set of data.

If you want to get at the formula, you should use automation.

--
HTH

Bob Phillips

"Rob Oldfield" wrote in message
...
Hi,

I'm trying to write something in .Net which will look at an Excel file

and
be able to read the formualae within it. I'd prefer not to do this via
automation and I'm currently trying it via an ADO connection. My

connection
string is along the lines of

Provider=Microsoft.Jet.OLEDB.4.0;Data

Source=h:\excelsearch\1.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1"

...but that is returning the value of a cell, instead of the underlying
formula. Does anyone know if I can change the connection string in some

way
so that I get the formulae, or have any bright ideas on another way of
getting at the data?

Many thanks for any ideas.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change to formulae Emma Hope Excel Worksheet Functions 3 September 5th 05 09:16 PM
Searching TEXT in formulae, rather than results of formulae AndyE Excel Worksheet Functions 1 July 15th 05 10:57 AM
Dynamic formulae - similar to lotus 123 for excel JohnD Excel Discussion (Misc queries) 1 July 5th 05 11:41 PM
XL2002 Clipboard doesn't paste formulae Jonathan Excel Discussion (Misc queries) 2 May 23rd 05 12:17 PM
vlookup change column index position - without changing formulae loopyloobyloo Excel Worksheet Functions 1 November 26th 04 01:35 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"