从Excel和Excel中的特定单元格导入数据导出到Excel模板 [英] Import data from Specific cells in Excel & Export to Excel Template

查看:85
本文介绍了从Excel和Excel中的特定单元格导入数据导出到Excel模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,


 


我是编程新手,我需要创建一个简单的业务应用程序..


 


方案是我有一个excel文档,其中包含我需要创建另外两个具有不同模板的Excel文档所需的所有信息。


我尝试使用Excel Importer,但excel文档的所有信息都在工作表上,而Excel Importer需要表格格式,第一行(标题) - 第二行是数据。我想知道是否有一种方法可以从指定单元格中导入数据
以获取lightswitch中的某些信息..


有没有办法将数据导出到带有模板的Excel文档而不是表格形式?


 


谢谢

解决方案

"Excel导入程序"被设计*用于导入"行"将数据导入现有的屏幕集合,因此您将无法使用它从" 所有
超过工作表
"。它当然可以以编程方式(使用Office Automation / COM)进行,但如果您不熟悉编程,那么这将不是一项非常简单的任务。进口商附带源代码,所以如果你研究它,你可能会从那里得到
的一些想法。


不幸的是,内置的"导出到Excel"功能旨在导出"集合"。数据到普通工作表,所以你将无法做你想做的事情。您必须将其导出到临时工作表,&然后将该数据导入
模板。没有可用于此功能的源代码,甚至不能从您自己的代码中调用它,只能从内置按钮调用。


对所有坏消息感到抱歉


Dear All,

 

I am new to programming and I need to create a simple business application..

 

The scenario is I have an excel documents which have all the informations I need to create another 2 more excel documents with different templates.

I tried to use Excel Importer to but the excel document have all the information is all over the worksheet whereas Excel Importer requires tabular format, first row(Title) - 2nd row is data. I wonder if there is a way to import data from specified cells for certain information in lightswitch..

And is there a way to export the data to Excel document with a template and not in table form?

 

Thank you

解决方案

The "Excel Importer" is *designed* to import "rows" of data into an existing screen collection, so you won't be able to use it to import data from "all over the worksheet". It's certainly possible to do it programatically (using Office Automation/COM), but if you're new to programming it's not going to be a very simple task. The importer comes with source code, so if you study it, you might get some ideas from there.

Unfortunately, the built-in "Export to Excel" functionality is designed to export "collections" of data to a plain worksheet, so again you won't be able to do what you want. You'd have to export it to a temporary worksheet, & then import that data into your template. There is no source code available for this functionality, it's not even available to be called from your own code, only from the built-in button.

Sorry for all the bad news.


这篇关于从Excel和Excel中的特定单元格导入数据导出到Excel模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆