473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

READ EXCEL DATA CELL BY CELL FROM SP

HI,

I HAVE AN EXCEL SHEET WITH SOME DATA, I WANT TO IMPORT THAT DATA (CELL
BY CELL WITH MANIPULATION) INTO THE SQL SERVER TABLES BY USING STORED
PROCEDURE(IF POSSIBLE).

IF ANYBODY HAVE DONE SIMILER TYPE OF JOB OR KNOWING ABOUT IT, PLS. LET
ME KNOW.

THANKS IN ADV.

T.S.NEGI
Jul 20 '05 #1
4 6719
Wrap sql server with an object tag and create an instance for every
spreadsheet you have. Seriously, save your spreadsheet as a CSV and
use Bulk Insert. It's straight forward and can be found on the sql
Books On Line Help. -- Louis
Jul 20 '05 #2
lo************@hotmail.com (louis nguyen) wrote in message news:<b0*************************@posting.google.c om>...
Wrap sql server with an object tag and create an instance for every
spreadsheet you have. Seriously, save your spreadsheet as a CSV and
use Bulk Insert. It's straight forward and can be found on the sql
Books On Line Help. -- Louis

Louis thanks for your reply.

But this does not seems to solve my problem.

Bulk insert will not be right in this situation, coz. I have to
manipulate data also.

for example. if some record (id) already exist in data, in that case
only updation may require.
If I could read cell by cell data from excel sheet, then only this
level of manipulation is possible.

T.S.Negi
Jul 20 '05 #3
ti********@mind-infotech.com (T.S.Negi) wrote in message news:<a1**************************@posting.google. com>...
lo************@hotmail.com (louis nguyen) wrote in message news:<b0*************************@posting.google.c om>...
Wrap sql server with an object tag and create an instance for every
spreadsheet you have. Seriously, save your spreadsheet as a CSV and
use Bulk Insert. It's straight forward and can be found on the sql
Books On Line Help. -- Louis

Louis thanks for your reply.

But this does not seems to solve my problem.

Bulk insert will not be right in this situation, coz. I have to
manipulate data also.

for example. if some record (id) already exist in data, in that case
only updation may require.
If I could read cell by cell data from excel sheet, then only this
level of manipulation is possible.

T.S.Negi


Probably the easiest approach is to BULK INSERT or DTS the spreadsheet
into a staging table, then do an INSERT into the target table. That
way you can check and clean up the data while it's in the staging
table, and before it goes to the 'real' table.

Simon
Jul 20 '05 #4
> If I could read cell by cell data from excel sheet, then only this
level of manipulation is possible.


If you're more comfortable doing arrays/loops, I don't think T-SQL has
it. I would suggest bulk inserting into a temp table. Update
(manipulate it). Identify new records and insert. Identify existing
records and update.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
5
by: Axial | last post by:
Question: How to select columns from Excel-generated XML when some cells are empty. I've found examples where rows are to be selected, but I can't seem to extrapolate from that to selecting...
0
by: Peter | last post by:
I am having a problem reading an Excel file that is XML based. The directory I am reading contains Excel files that can be of two types. Either generic Microsoft based or XML based. I am reading...
1
by: ashok0866 | last post by:
I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel. The issue...
1
by: aotemp | last post by:
Hi, Im having a reaaally hard time with something... Im trying to read a cell of data into a String variable. It seems like such a simple task too... Get the excel spreadsheet, get the...
2
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages...
4
by: wellscrambled | last post by:
Folks, Probably don't have the right forum here, but this is all a bit new to me. I have a web site that sends me a daily email with an excel spreadsheet attachment that contains some customer...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.