简体   繁体   English

将数据从Word导出到Excel的脚本

[英]Script to export data from Word to Excel

I'm sorry if this is a stupid question, but I really don't have a clue how to solve this task. 很抱歉,这是一个愚蠢的问题,但是我真的不知道如何解决此任务。

I was asked to write/find a script that would go through folders with Word documents, take some data from them (for example second line in every word doc) and export them to prepaired columns in one common Excel sheet. 我被要求编写/查找一个脚本,该脚本将通过包含Word文档的文件夹,从中获取一些数据(例如,每个Word文档中的第二行),然后将它们导出到一个普通Excel工作表中的预配对列中。

All the folders with Word documents are on a SharePoint site. 具有Word文档的所有文件夹都位于SharePoint网站上。 I was not told the technology to be used to realize this, I guess there are two main options: Python or powershell. 没有告诉我用于实现此目的的技术,我想有两个主要选择:Python或powershell。

Down below I put two pics, this is how it should approximately look like. 下面我放了两张照片,这就是大概的样子。 Please, if anyone has got any thoughts, ideas or tips, it will be highly appreciated. 请,如果任何人有任何想法,想法或技巧,将不胜感激。

Example of a target file: 目标文件的示例:

目标文件示例

Example of a source file: 源文件示例:

示例源文件

You can always start by finding the API for SharePoint, which is located here: 您始终可以从以下位置找到SharePoint的API:

https://github.com/ox-it/python-sharepoint https://github.com/ox-it/python-sharepoint

Learn to connect using your desired auth method, and then go from there. 学习使用所需的身份验证方法进行连接,然后从那里进行连接。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM