[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to work with excel from TSQL

Posted on 2007-08-07
8
Medium Priority
?
2,032 Views
Last Modified: 2013-11-05
Hi All,

I'd like a workign example on how to, in TSQL in SQL server 2000, open an excel workbook 'c:\tester.xls'. update field "value1" and "value2" from the first worksheet.
run the calculate method
and read the value from the "result" field

regards
0
Comment
Question by:DaFou
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:Ved Prakash Agrawal
ID: 19644380
you can use OPenQuery, OpenDataSource...function to access excel.csv,mdb from t-SQL.
0
 
LVL 11

Expert Comment

by:Ved Prakash Agrawal
ID: 19644384
0
 
LVL 2

Author Comment

by:DaFou
ID: 19644405
no good, i am looking to work with the excel workbook not only import data from it.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 11

Accepted Solution

by:
Ved Prakash Agrawal earned 1000 total points
ID: 19644499
Try to create Linked Server for the excel then you will be able to work on worksheet as like u r working with the linked server for the database.

0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 1000 total points
ID: 19644572
0
 
LVL 2

Author Comment

by:DaFou
ID: 19644711
how can i have excel do calculations using the OPENDATASOURCE and work with the results in TSQL?
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question