flex 导出word

flex端: <s:HGroup width="100%" horizontalAlign="right" verticalAlign="middle">

				<s:Button label="打印" click="print(event)"/>
				<s:Button label="导出word" click="exportDataWithRO()"/>
			</s:HGroup>

 [Bindable]

			public var route:TouristRoute;

 private function exportDataWithRO():void {

				array.push(route);
				export.exportData("Doc2",new ArrayCollection(array));
			}
			private function exportResultHandler(event:ResultEvent):void {
				var jspFile:String = event.result as String;
				navigateToURL(new URLRequest(jspFile), "_blank");
			}

<fx:Declarations>
		<mx:RemoteObject id="export" destination="FlexDataExporter" showBusyCursor="true" concurrency="last">
			<mx:method name="exportData" result="exportResultHandler(event)" fault="exportFaultHandler(event)"/>
		</mx:RemoteObject>
		
		<mx:DateFormatter id="df" formatString="YYMMDD"/>
		<mx:DateFormatter id="dateFormat" formatString="YYYY-MM-DD"/>
	</fx:Declarations>

 java端:

import flex.messaging.*;
import flex.messaging.io.ArrayCollection;

import java.io.*;

import javax.servlet.http.*;


public class FlexDataExporter extends HttpServlet implements Serializable {

	private static final long serialVersionUID = 2L;

	public HttpServletRequest request;
	public HttpServletResponse response;
	public FlexSession session;
	public FlexDataExporter() {
		request = FlexContext.getHttpRequest();
		session = FlexContext.getFlexSession();
		response = FlexContext.getHttpResponse();
	}
	public Object exportData(String reportName, ArrayCollection arrayConnection) throws Exception {
		String jspFileName = null;
		try {

    	    session.setAttribute("arrayList", arrayConnection);
    	    HttpServletRequest req = FlexContext.getHttpRequest();
            String contextRoot = null;
            contextRoot = req.getContextPath();
            jspFileName = contextRoot + "/jsp/test1.jsp?reportName="+reportName;
        } catch (Exception e) {
            e.printStackTrace();
		}
        return jspFileName;
	}

}
 

 

ActionScript3.0类大全(Word格式) 立即下载

相关推荐

debian mirrors 镜像源 riscv 64 赛昉 星光 starfive vf2 InRelease‘ doesn‘t support architecture ‘riscv64‘

debian mirrors 镜像 riscv 64 赛昉 星光2 starfive vf2 InRelease' doesn't support architecture 'riscv64'

qq_29758759的博客 1259

R语言使用flextable包将输出结果导入word,并设置默认输出三位小数

Error: package or namespace load failed for 'flextable' in loadNamespace(j = 0.39 is required Traceback:`

qq_54423921的博客 2692

使用openair包分析气象数据

气象数据通常是有规律的时间序列,分析气象数据时需要对空气质量测量、气象数据和扩散模型输出进行分析。openair 是用于分析空气质量数据或更广泛的大气成分数据的R软件包。该软件包广泛应用于学术界、公共和私营部门。该项目最初由英国自然环境研究委员会(NERC)资助,并由英国环境部(Defra)提供额外资金。

Christina 2522

flex word 与 excel

plication/doc ; charset=utf-8"); PrintWriter out = response.getWriter(); out.print("something"); String filename = "lance.doc"; response.setHeader("Content-Disposition", "attachment; filename="+filename);

lance9118的专栏 243

图片边界矢量化-地理配准

无地理和投影信息的JPG图片,通过ArcGIS进行地理配准(Georeferencing)完成数字化边界。

u012727861的博客 1908

PLCopen运动控制避坑指南:单轴功能块常见报错排查(基于SM3_Basic函数库)

本文深入解析PLCopen运动控制中单轴功能块的常见报错问题,基于SM3_Basic函数库提供实用排查指南。从功能块逻辑错误与硬件报错的甄别技巧到高频报错场景的解决方案,帮助工程师快速定位并解决运动控制系统中的稳定性问题,提升工业自动化设备的运行效率。

weixin_33686714的博客 318

Java导出Word文档案例

最近做的一个Flex项目中要把报表导出到Word文件中。网上查了好多资料后最终在网友的帮助和自己的奋斗下成功搞定。现把代码贴出来供大家批评指正并一起学习。 package org.replace; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.

myhnuhai的专栏 620

SAP PS模块实战指南:从项目启动到结算的全流程解析

本文详细解析SAP PS模块在项目管理中的全流程应用,从项目启动到结算的关键操作与实战技巧。通过WBS设计、预算控制和资源调配等核心功能,帮助管理者高效协调项目进度与成本,特别适用于交付型和成本型项目管理。掌握PS模块能显著提升项目管理效率与精准度。

weixin_42553471的博客 450

使用原生js导出HTML为word

要导出的页面 导出注意点 我只测试图片中的内容 1、图片:如果是网络图片,导出之后再wps可以查看,word 不行 2、a 标签链接可以 3、内联样式可以 4、flex 布局不可以 code /* 导出方法 */ exportHTML() { let header = "<html xmlns:o='urn:schemas-microsoft-com:office:office' " + "xmlns:w='urn:schemas-microsoft-com:office:wo

bao 2124

华为od 面试八股文_测试/测试开发_01_含答案

华为od面试八股文_测试/测试开发_01_含答案

MISAYAONE的博客 3821

深度学习在传感器数据分析中的创新应用

传感器是物理世界与数字世界的“接口”,其生成的高维、时序、多源数据蕴含着设备状态、环境变化、用户行为等关键信息。传统传感器数据分析依赖手工特征工程与简单机器学习模型,难以应对复杂场景下的非线性、长程依赖与实时性需求。深度学习通过自动特征提取非线性建模与端到端学习,成为传感器数据处理的革命性工具。本文从概念基础理论框架架构设计实现机制到实际应用,系统拆解深度学习与传感器数据的融合逻辑,结合工业预测维护医疗健康监测智能交通等场景,揭示其技术边界与未来演化方向。

大数据洞察的博客 568

flex操作word文档和excel【转】

来自http://blog.sina.com.cn/s/blog_4d65c19e0100f4z7.html### 一、flex与word协作: 对于word,可将word文档模板文件存成xml格式,而此xml文档中的图片是以“base-64 encoded”,而flex3可以将生成的图片快照下来再转换成此格式,flex能够操作xml文件,从而可以修改word xml模板文件中的内容,从而与w

xiaoxin888888的专栏 1733

【基础-单选】Row组件中有两个Text组件,如果使用justifyContent对齐方式,下面哪个属性可以实现左右两端对齐:

Row组件中有两个Text组件,如果使用justifyContent对齐方式,下面哪个属性可以实现左右两端对齐

江拥羡橙的博客 1305

flex 生成word excel 个人总结

1 flex 与 word flex生成word 我目前还没有找到好的方法,唯一想到的就是利用servlet 直接向word中输出关键就是 下面几句 [code="java"] response.setContentType("application/doc ; charset=utf-8"); PrintWriter out = response.getWriter(); out...

Crystal_Knight的专栏 302

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

原生js输出html,使用原生js导出HTML为word

使用原生js导出HTML为word使用原生js导出HTML为word要导出的页面导出注意点我只测试图片中的内容1、图片:如果是网络图片,导出之后再wps可以查看,word 不行2、a 标签链接可以3、内联样式可以4、flex 布局不可以code/* 导出方法 */exportHTML() {let header =""xmlns:w='urn:schemas-microsoft-com:offic...

weixin_39815329的博客 344

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

flex操作word文档和excel

一、flex与word协作: 对于word,可将word文档模板文件存成xml格式,而此xml文档中的图片是以“base-64 encoded”,而flex3可以将生成的图片快照下来再转换成此格式,flex能够操作xml文件,从而可以修改word xml模板文件中的内容,从而与word协作。 将ImageSnapshot对象利用de>flex3的encod...

weixin_30423977的博客 198

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

Flex实现将Wrod文档和Excel文档转xml,以及读取csv

一、flex与word协作: 对于word,可将word文档模板文件存成xml格式,而此xml文档中的图片是以“base-64 encoded”,而flex3可以将生成的图片快照下来再转换成此格式,flex能够操作xml文件,从而可以修改word xml模板文件中的内容,从而与wor...

chongfeng4470的博客 174

Vue项目导出Word文档:纯前端与前后端协作方案全解析

在前端开发中,数据导出是常见的功能需求,尤其在后台管理系统和报表场景中,将页面内容导出为Word文档便于存档和分享。其核心原理通常涉及将结构化数据或HTML内容转换为Office Open XML格式。从技术实现看,主要分为纯前端生成和前后端协作两种路线。纯前端方案利用Blob对象和html-docx-js等库,在浏览器端完成转换和下载,适合对格式要求不高、追求实时性的场景;而前后端协作方案则通过前端组装JSON数据、后端使用POI或python-docx等库生成高质量文档,能实现像素级精确控制和复杂排版。

weixin_29012677的博客 228

中国海洋大学《移动软件开发》实验3:高校新闻网 开发记录

<think>We need to generate a summary of ≤150 characters? Wait "≤150字" means ≤150 Chinese characters. Need a concise abstract based on provided content. The content describes a WeChat mini program experiment: "高校新闻网" with features like homepage, detail, per

xiaoyang_0621的博客 187

flex4 操作word文档

对于word,可将word文档模板文件存成xml格式,而此xml文档中的图片是以“base-64 encoded”,而flex4可以将生成的图片快照下来再转换成此格式,flex能够操作xml文件,从而可以修改word xml模板文件中的内容,从而与word协作。 将ImageSnapshot对象利用flex4的encodeImageAsBase64()方法转换为base-64 encoded格式

u010395804的专栏 1231

vue如何把html转换word,vue导出html、word和pdf的实现代码

X-Find迅聘选才`;return html;}导出的样式js文件:.page_layout {position: relative;height: 100%;display: flex;& .layout_content {flex-grow: 1;display: flex;flex-direction: column;}}...2、导出Word1)使用上面构造好的html文本,以文...

weixin_39574050的博客 1104

vue 生产word_vue怎么导出word文档?

展开全部用这个e69da5e887aa62616964757a686964616f31333431373862 jquery.wordexport.js我用的是网页链接 这个,大佬修改了源代码做成组件,vue组件里导入就可以使用了,两个依赖在组件里都调用了importwordExportfrom'./public/wordExport/jquery.wordexport';源代码里有一段/...

weixin_42664597的博客 554
上一篇: eclipse.ini文件配置
下一篇: jacob操作word
javaee_jsp
博客等级 码龄15年 0粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值