View Single Post
  #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.