Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change to formulae | Excel Worksheet Functions | |||
Searching TEXT in formulae, rather than results of formulae | Excel Worksheet Functions | |||
Dynamic formulae - similar to lotus 123 for excel | Excel Discussion (Misc queries) | |||
XL2002 Clipboard doesn't paste formulae | Excel Discussion (Misc queries) | |||
vlookup change column index position - without changing formulae | Excel Worksheet Functions |