简体   繁体   English

我如何使用SQL Server从Excel中获取数据

[英]How do i get data from excel using sql server

I have a table of workers on an excel sheet, with the fields (ID (worker identification number in the company), Name, Nickname, Date of Birth, Function (If you are a machine manager, if it is equipment management. ..), Importance (Each function has a different importance, if it is a machine operator has more importance than the receptionist)). 我在excel工作表上有一张工人表,其中包含以下字段(ID(公司中的工人标识号),名称,昵称,出生日期,功能(如果您是机器管理员,则是设备管理)。 ),重要性(如果是机器操作员,则每个功能都比接待员更重要)。

And what I want to do is to make a query that goes to excel sheet to draw 4 workers, returning the Name, Nickname and Function. 我想做的是查询到Excel工作表以绘制4个工作程序,并返回名称,昵称和函数。

The draw must be made by the importance of the worker. 必须根据工人的重要性来决定。

Those who have the highest degree of importance are more likely to be drawn. 重要程度最高的人更容易被吸引。

I found something interesting, maybe give it a look: https://support.microsoft.com/en-us/help/321686/how-to-import-data-from-excel-to-sql-server 我发现了一些有趣的东西,也许看看吧: https : //support.microsoft.com/en-us/help/321686/how-to-import-data-from-excel-to-sql-server

Never thought this would be possible. 从来没有想过这是可能的。 Well, the more you know. 好吧,您知道的越多。

what you are asking is not directly possible using query. 您所要询问的内容无法直接通过查询获得。 You have to use some third party library like iTextSharp or Aspose to do this. 您必须使用诸如iTextSharp或Aspose之类的第三方库来执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在SQL Server中使用from和date获取数据? - how to get the data using from date and to date in sql server? 如何从SQL Server导出包含数据的.sql文件并将其导入MySQL? 我可以那样做吗? - How to export .sql file with data from SQL Server and import it in MySQL? Can I do that? Vue CRUD 使用 NodeJs (MySql conncetion) - 如何从服务器端获取数据到客户端? - Vue CRUD using NodeJs (MySql conncetion) - How do I get the data from server-side to client-side? 如何从SQL Server切换到MySQL以与Excel Pivot一起使用 - How to switch from SQL Server to MySQL for using with Excel pivot 从excel文件将数据插入SQL服务器 - Inserting data into a SQL server from an excel file 如果我只知道用户名,如何使用SQL语句从网站获取数据? - How do I use SQL statement to get data from a website if all I know is the username? 如何使用Python将数据从MySQL数据库保存到Excel文件而不是数字 - How do I save data from MySQL db to excel file as Number not text using Python 使用 html 和 php 从 xampp sql 服务器获取数据 - get data from xampp sql server using html and php 使用python pyodbc和pandas数据框将数据从SQL服务器导出到Excel - Exporting data from SQL server to Excel using python pyodbc and pandas Data frame 如何将Excel工作表中的数据添加/添加到表中? - How do I add/append data from an excel sheet to a table?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM