简体   繁体   English

是否可以仅使用javascript修改文档库中的.js / .json文件?

[英]Is it possible to modify a .js/.json file in a Document Library using only javascript ?

We have a html file in a Document Library which contains a large html table with useful info. 我们在文档库中有一个html文件,其中包含带有有用信息的大型html表。 (this files is exported manually from a different app) The info would be even more useful/accessible if it was in json format. (此文件是从其他应用程序手动导出的)如果信息为json格式,则该信息将更加有用/易于访问。 (far faster to load and more accessible) The use case would be : (加载速度更快,更易于访问)用例将是:

  • User uploads more recent file html file to the document library 用户将更多最新的文件html文件上传到文档库
  • User goes to a wikipage on the sharepoint site and clicks on a large button "Update JSON" 用户转到共享点站点上的Wikipage,然后单击大按钮“ Update JSON”
  • A javascript does the following JavaScript执行以下操作
    • reads the contents of the html file 读取html文件的内容
    • generates valid json 生成有效的json
    • saves this json to an existing .json file in the document library, overwriting the current contents 将此json保存到文档库中现有的.json文件中,覆盖当前内容

Any ideas ?? 有任何想法吗 ??

Thanks / Colm 谢谢/ Colm

PS Everything has to be client-side, javascript is the only option. PS一切都必须在客户端,javascript是唯一的选择。

I encountered some link for similar task, hopefully it would help you to some extent. 我遇到了类似任务的链接,希望它能在一定程度上对您有所帮助。

http://dannyjessee.com/blog/index.php/2013/02/using-jsom-to-write-small-files-to-a-sharepoint-2013-document-library/ http://dannyjessee.com/blog/index.php/2013/02/using-jsom-to-write-small-files-to-a-sharepoint-2013-document-library/

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

相关问题 使用客户端 JavaScript 创建一个带有几种样式的 excel 文件(如果可能,使用 js-xlsx 库) - Create an excel file with a few styles using client side JavaScript (if possible using js-xlsx library) 保存html输入并稍后获取文件。仅通过使用JS,AJAX,JSON才能做到这一点 - saving html inputs and later fetch file.Is this possible only by using JS,AJAX,JSON only 是否可以使用JS修改从中调用脚本的html文件? - Is it possible to modify a html file, from which the script is called, using JS? 在JavaScript库中使用JSON配置文件 - Using JSON config file in javascript library 修改JSON格式以使用JavaScript模板库 - Modify JSON fomat to work with JavaScript template library 是否可以仅使用 JavaScript 将数据写入文件? - Is it possible to write data to file using only JavaScript? 如何使用Javascript在Sharepoint 2007文档库中创建新文件 - How to create a new file in Sharepoint 2007 document library using Javascript Output SharePoint 文档库文件到 CSV 文件使用 Z686155AF75A60A0EDD3F6E9D80C9Z 文件 - Output SharePoint Document Library Files to CSV File Using JavaScript Rails 3生成json文件以在javascript库中使用它-D3.js - Rails 3 generating json file to use it in javascript library - D3.js 是否可以在不使用 JSON 服务器的情况下使用 Javascript 访问 JSON 文件? - Is it possible to access a JSON file using Javascript without using a JSON server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM