473,394 Members | 1,843 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,394 software developers and data experts.

How to put a Word/Excel file into a database

Hi everyone,

I have data coming to me in the form of Word and Excel files, and I
need to place this data into a SQL Server database. The Word file will
be coming in text which is similiar to an Excel sheet, but instead of
being comma delimited, it will be delimited by spaces. Regarding the
Word document, I can set rules for the field length myself, but my
question is regarding the proper programming APIs to use. Can this be
done via VB scripts on the documents, or as a seperate .NET
application? I have access to both the C# and VB.NET platforms. (And
J2EE as well, although a Microsoft platform would be more appropriate,
IMHO). Any ideas on the best way to do this?

Thanks,

Apr 23 '06 #1
3 1358
JV
Why not just use SQL Server's DTS functionality?
<he*******@hotmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
Hi everyone,

I have data coming to me in the form of Word and Excel files, and I
need to place this data into a SQL Server database. The Word file will
be coming in text which is similiar to an Excel sheet, but instead of
being comma delimited, it will be delimited by spaces. Regarding the
Word document, I can set rules for the field length myself, but my
question is regarding the proper programming APIs to use. Can this be
done via VB scripts on the documents, or as a seperate .NET
application? I have access to both the C# and VB.NET platforms. (And
J2EE as well, although a Microsoft platform would be more appropriate,
IMHO). Any ideas on the best way to do this?

Thanks,

Apr 23 '06 #2
Herman404,
You are saying "Word and Excel" but then you are descibing delimited text
files that would need to be imported into either Word or Excel in order to
become real Office application documents (e.g. ".doc" and ".xls" files). So
you are really desribing two issues.
1) To import delimited text into either Word or Excel you would need to use
the respective Primary Interop Assembly for that office application.
2)regarding storing in the database, text can always be stored in a TEXT or
NTEXT column. "Real" Word or Excel files are binary and so would need to be
stored in am Image type column.
Hope that helps.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"he*******@hotmail.com" wrote:
Hi everyone,

I have data coming to me in the form of Word and Excel files, and I
need to place this data into a SQL Server database. The Word file will
be coming in text which is similiar to an Excel sheet, but instead of
being comma delimited, it will be delimited by spaces. Regarding the
Word document, I can set rules for the field length myself, but my
question is regarding the proper programming APIs to use. Can this be
done via VB scripts on the documents, or as a seperate .NET
application? I have access to both the C# and VB.NET platforms. (And
J2EE as well, although a Microsoft platform would be more appropriate,
IMHO). Any ideas on the best way to do this?

Thanks,

Apr 23 '06 #3
Hi Peter,

We don't need the file itself in the database, we need the text in the
file itself. It would be easier to get it as pure text, but our
customer sends the data to us in Word and Excel, and there's no way we
can change that. But it sounds like the Primary Interop Assembly could
be used to output the data in a Word or Excel to a .txt and .csv file
respectively? If that could be done, then it could solve our issues.

Thanks,
Herman

Peter wrote:
Herman404,
You are saying "Word and Excel" but then you are descibing delimited text
files that would need to be imported into either Word or Excel in order to
become real Office application documents (e.g. ".doc" and ".xls" files). So
you are really desribing two issues.
1) To import delimited text into either Word or Excel you would need to use
the respective Primary Interop Assembly for that office application.
2)regarding storing in the database, text can always be stored in a TEXT or
NTEXT column. "Real" Word or Excel files are binary and so would need to be
stored in am Image type column.
Hope that helps.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


Apr 24 '06 #4

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

Similar topics

41
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
0
by: Starriol | last post by:
Hello. I'm working on a project with an excel database and need help with the following. This database has some dates that are changed regularly and I need to make an automated system so...
6
by: Chris | last post by:
Hi, - How can I open an existing word document from a C#-client and manipulate that document from within the C#-client ? - How can I open an excel document that is embedded in a word-document...
4
by: Chris | last post by:
Hi, everything works apart from the last line :-(( rng.Value2.ToString() An exception is thrown : "Old format or invalid type library" It gets compiled though (so he recognizes the property...
3
by: herman404 | last post by:
Hi everyone, I have data coming to me in the form of Word and Excel files, and I need to place this data into a SQL Server database. The Word file will be coming in text which is similiar to an...
7
by: vbnetdev | last post by:
My boss wants this done in a day. I would be happy with a week! Anyway, I have a dataset filled with data and need to populate an MS word chart with it when writing a report. Any tutorials or...
2
by: reb0101 | last post by:
hey all, I would very much appreciate any help or ideas on how to do this as I am stumped. I need to develop an access database to track documents but also link to them. I’ll explain what it...
12
by: Steve | last post by:
I've been building an application that will merge fields in a text file with a word template, save the resulting word file out to the user's hard drive, and then email the file as an attachment. ...
0
by: Vader | last post by:
I am new to this forum. Thanks in advance for and help. The following is what I am looking for: 1. I need help with VB code to open a MS Word (.doc) file. 2. Read lines from the MS Word (.doc)...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.