Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can each Excel cell have its own SQL statement?

Status
Not open for further replies.
Jul 21, 2005
87
US
If we were using SQL statements to update an Excel spreadsheet, can each cell have its own SQL statement?
 
I was looking over your question and would love to try to answer it, but I need more information.
I can not think why each cell in a spreadsheet would need a sql statement, I could see one sql statement involving a number of fields being displayed in Excel, each field in a seperate column.

Thanks,
Pigster14
 
Thanks for your replies... for waht is's worth, here's what we're trying to do:

Accounting data is in a SQL-based accounting package. Client has financial statements already formatted in Excel that they are damant about using.

We want to update Excel with current data from the database. The spreadsheets have totaling formulas, comments, underlines, etc. scattered throughout the spreadsheet... therefore, we can't just do a "data dump" to Excel.

Each cell represents a different grouping of account numbers and date ranges (i.e columns for Jan, Feb, Mar).

We HAVE a way we can use account numbers on the left and date ranges on the top to use as "substitutes" in our SQL commands... (i.e select amount from transactions where account_number=$a$3 and trandate >= $b$1 and trandate <= $b$2 group by account_number)... but this gets a little more complicated if there are multiple accounts that need to be grouped... particularly if they are not in a "from-thru" range.

We're just trying to get a little feedback on if, worst case, you think we CAN enter a separate command in each cell...
 
again my answer is same as before. use sql to get the raw data with view or query. then use excel function to put data on any cell you want. use excel as data view format not data manipulation.
thanks

SQL Help Blog
 
I understand your issue with Accounting not wanting to change. I have gone through this and my suggestion is they are going to have to change their ways or manually do the work. We do still have some spreadsheets that our Accounting uses and they maintain them manually by choice. But there are other ones that they have allowed us to change.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top