从Google Spreadsheet复制范围/单元格值的脚本-粘贴到Excel中 [英] Script to copy range/cells value from Google Spreadsheet - paste in Excel
问题描述
我正在寻找一个可以帮助我在Google Spreadsheet中复制特定范围的脚本,因此我可以将其粘贴到将处理此数据的Excel文件中.
I'm looking for a script that can simply help me COPY a specific range in Google Spreadsheet so I can just paste it in an Excel file where this data will be processed.
梦想"解决方案是将G电子表格的范围自动连接并粘贴到Excel文件中,但是如果可以运行一个脚本来记忆"所有所需范围,那么我可以在Excel中单击粘贴"-这样可以节省生命!
The "dream" solution would be to connect and paste automatically the range from the G-Spreadsheet into the Excel file, but if there is a possibility to run a script that will "memorize" all the wanted range so I can just click "paste" in Excel - it would be a life saver!
非常感谢!
推荐答案
我将处理Google表格中的数据.好多了但是如果你坚持...
I would process data in Google Sheets. It's better. But if you insist...
首先,在源Google表格上编写GAS代码.该脚本执行以下步骤:
First, write GAS code on source Google Sheet. The script executes these steps:
- 填充所有不需要的区域
xxx
或其他内容. - 将工作表保存到csv文件中.
- 现在,撤消步骤1.
第二,在目标Excel文件上编写VBA代码.该脚本执行以下步骤:
Second, write VBA code on target Excel file. The script executes these steps:
- 打开由上述GAS代码创建的csv文件.
- 读取所有值.您可以跳过
xxx
. - 将这些值粘贴到特定的目标区域.
然后,您只需在Google表格中单击一次,然后在Excel和tadah中单击另一次!知道了.
Then you just click one time in Google Sheets, and click another time in Excel and tadah! You got it.
同样,我会处理Google表格中的数据.
Again, I would process data in Google Sheets.
这篇关于从Google Spreadsheet复制范围/单元格值的脚本-粘贴到Excel中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!