我们可以将Excel文件导入SQL Server 2000吗? [英] Could we import an Excel File into SQL Server 2000?

查看:88
本文介绍了我们可以将Excel文件导入SQL Server 2000吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我试图将一个excel文件导入MS SQL Server 2000几天,不幸的是,到目前为止我看不到一线希望。


我已经在网上浏览了几个小时,但又没有具体的解决方案。


任何人都可以来我的救援...... 。


实际上,我正在为想要将一个名为ExamResults的Excel文件导入SQL Server 2000的学生解决问题。


文件ExamResults由表1组成,包含以下标题信息:

IndexNo

姓氏

名称

标准

主题

标记


我在SQL Server 2000中创建了一个数据库名称''Results''并希望在其中导入该文件。


请帮助....

Hello everybody

I am trying to import an excel file for days into MS SQL Server 2000, unfortunately, I cannot see a ray of hope till now.

I have surfed the WEB for hours, but again no concrete solution.

CAN ANY ONE COME TO MY RESCURE PLEASE.....


Actually, I am solving a problem for a student who wants to import an Excel file called ExamResults into SQL Server 2000.

The file ExamResults consists of sheet 1 with the following header info:
IndexNo
Surname
Name
Standard
Subject
Marks

I have created a database name ''Results'' in SQL Server 2000 and wish to import that file therein.

Please help....

推荐答案

我认为你可以使用SQL Server管理SQL Server 2005中的工作室,我不知道2000年。


2005年,右键单击目标数据库,将鼠标悬停在任务上,然后选择导入数据...


这将启动导入导出向导。


您还可以编写以excel com对象为中心的自定义程序。几年前我写了一个这样的程序,它帮助我学习了我现在每天使用的许多基础知识。随着我的技能和经验的发展,它已经发展。试试吧。
I think you can do this using SQL Server Management Studio in SQL Server 2005, I don''t know about 2000.

For 2005, right click on the target database, hover over Tasks, then select import data...

This will start the Import Export Wizard.

You could also write a custom program centered around the excel com object. I wrote a program like that a few years ago and it has helped me to learn many fundamentals that I use on a daily basis now. It has evolved as my skill and experience has evolved. Try it.



我认为你可以使用SQL Server 2005中的SQL Server Management Studio来做到这一点,我不知道2000年。


2005年,右键单击目标数据库,将鼠标悬停在任务上,然后选择导入数据...


这将启动导入导出向导。


您还可以编写以excel com对象为中心的自定义程序。几年前我写了一个这样的程序,它帮助我学习了我现在每天使用的许多基础知识。随着我的技能和经验的发展,它已经发展。试试吧。
I think you can do this using SQL Server Management Studio in SQL Server 2005, I don''t know about 2000.

For 2005, right click on the target database, hover over Tasks, then select import data...

This will start the Import Export Wizard.

You could also write a custom program centered around the excel com object. I wrote a program like that a few years ago and it has helped me to learn many fundamentals that I use on a daily basis now. It has evolved as my skill and experience has evolved. Try it.



你好先生,

非常感谢您的介入和建议


我我试图使用DTS导入导出向导导入Excel文件并且它可以工作。


但是,我不想再次运行向导来导入Excel文件。我希望用ASP代码编写一个脚本来完成任务。


有人可以帮我。

Hello Sir,
Thank you so so much for your intervention and suggestions

I have tried to import the Excel file using the DTS Import Export Wizard and it works.

But, I do not want to run the wizard times and again to import the Excel file. I wish to write a script using ASP codes to do the task.

Could anyone help me please.


我会试着走路您完成整个过程并让您从那里开始编码。


在您的目录中创建一个新文件夹。简单地在C:驱动器上。


在代码隐藏页面中使用System.IO.Directory类查看该文件夹并找到所需excel文件的文件名进入。


ex。
I''ll try to walk you through the process and let you code it from there.

Create a new folder in your directory. Right on the C:drive for simplicity.

In the code behind page use the System.IO.Directory class to look in that folder and find the file name of the excel file you want to enter.

ex.
展开 | 选择 | Wrap | 行号


这篇关于我们可以将Excel文件导入SQL Server 2000吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆