问题描述
大家好!
我正在寻找将Excel数据提取到文本模板(.txt,.html或任何其他模板)的任何方法,以便可以从那里将其复制到剪贴板.
文字模板示例
名称:(将从excel中提取)
姓:(将从excel中提取)
地址:(将从excel中提取)
所有的excel文件都在同一单元格中包含数据.示例-名称"始终在B15中.我需要分别从每个excel文件中编译模板.
它应该工作的方式是-我使用浏览"按钮指定文件,信息被拉入模板.复制数据并指定另一个文件后,该模板将被清除.
在这个问题上的任何帮助将不胜感激.
Hello everyone!
I''m looking for any way to pull excel data into a text template (.txt, .html, or any other) so I can copy it to the clipboard from there.
Example of the text template
Name: (to be pulled from excel)
Surname: (to be pulled from excel)
Address: (to be pulled from excel)
All the excel files contain data in the same cells. Example - "name" is always in B15. I need to compile the template from every excel file separately.
The way it should work would be - I specify the file using "browse" button and the info gets pulled into a template. The template is getting cleared after data is copied and another file to be specified.
Any help on this issue would be very much appreciated.
推荐答案
// Method to set data in clipboard
window.clipboardData.setData("KeyName","my data goes here");
// Method to get data from clipboard
var contents = window.clipboardData.getData("KeyName");
希望这对您有用.
非常感谢.
尼拉·索尼(Nial Soni)
Hope this works for you.
Many thanks.
Niral Soni
这篇关于使用Excel数据编译文本模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!