|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to put a Word/Excel file into a databaseHi 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, Why not just use SQL Server's DTS functionality?
<herman***@hotmail.com> wrote in message Show quoteHide quote news:1145802683.392005.259800@z34g2000cwc.googlegroups.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, > 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 -- Show quoteHide quoteCo-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com "herman***@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, > > 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: Show quoteHide quote > 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
[DATE - newbie] change and set back
RS232 - Recive = Send???? GetDirectories Performance Debug.Wrile does not appear on the Output Window GetCurrentProcess.Id vs GetCurrentProcessId API Can't delete an image that is in a picture box Trying to execute something stored in variable Impersonation help with SQL 2000 needed Form Visibility Issue VB.NET 2003 Paste logo on image |
|||||||||||||||||||||||