Patent ID: 8271519

Claim:
A computer-implemented method of importing data into a spreadsheet from a data source external to the spreadsheet, wherein the spreadsheet comprises a grid of cells arranged into rows and columns, wherein a cell of the grid is configured to contain a value or a formula, the method comprising: identifying a set of cells containing formulas, wherein an identification of a cell and the formula in the cell are stored; executing a first user defined function to access a particular data record from the external data source, said executing the first user defined function comprising: determining, by use of one or more data processors, which of the stored formulas contain user defined functions to access data records from the external data source, wherein a user defined function to access a data record includes parameters identifying the data record to be accessed; resolving parameters of the identified user defined functions using the one or more data processors, wherein certain parameters are not resolved, wherein certain user defined functions have sufficient parameters resolved to identify a data record in the external data source; generating a bulk query to the external data source requesting data for the certain user defined functions having sufficient parameters resolved, including the first user defined function, using the one or more data processors, wherein the bulk query requests more data records than are specified by the user defined functions; storing the data records specified by the user defined functions that have resolution of sufficient parameters in a table for subsequent access; storing the more data records than are specified in a memory for subsequent access; and returning the particular data record from the table to the spreadsheet.