PDA

View Full Version : Manipulating Data from excel


charon
06-09-2003, 10:31 AM
Hi,

As we know that we can make query on excel file. But I'm facing one problem. That is when I'm trying to query on the excel file with the excel data not in proper format, mean that the first row is not the fields column name. It generated error as below:

Item cannot be found in the collection corresponding to the requested name or ordinal.

The field's name are at the 3rd or 4th row of the sheet row. This is because, the data is generated base on functions to calculate values.

any advice???

raf
06-09-2003, 12:26 PM
fix it in the excellfiel by creating an extra worksheet with just the variabelnames in the first row, and for the rest only the references to the cells you'd like to query

charon
06-09-2003, 12:49 PM
the problem is, i can't do like that as some of the value is using function. i.e A1 X 0.3.

more over, only some of the columns I needed. i.e

Author SellingPrice Quantiti Status.

Just assume that I only need author and selling price.

raf
06-09-2003, 01:34 PM
i didn't understand anything of that, but you can just reference to the cell, like you do when you write macro's in excell.

this is a good article on using excell as a dbhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasdj01/html/asp0193.asp
(posted on a previous thread by allida77)
I personally never queryed excell (no need to + i'd probably create an XML-middeltier)