Unlock instant, AI-driven research and patent intelligence for your innovation.

JavaScript-based method for exporting EXCEL by using HTML table

A table and object technology, applied in the field of JavaScript, can solve the problems of occupying server resources and the server cannot be recycled, and achieve the effect of improving processing efficiency and facilitating subsequent use

Inactive Publication Date: 2016-03-30
G CLOUD TECH
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical problem solved by the present invention is to provide a method for exporting EXCEL based on JavaScript to realize the HTML form, which solves the problem that the server must install excel, occupies server resources, and causes the server process to be unable to recycle, and the present invention also solves the complete output table after exporting Excel format

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • JavaScript-based method for exporting EXCEL by using HTML table
  • JavaScript-based method for exporting EXCEL by using HTML table
  • JavaScript-based method for exporting EXCEL by using HTML table

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Such as figure 1 As shown, the present invention adopts the following steps to realize the export of the HTML form to EXCEL.

[0021] Step 1. Define the HTML table;

[0022]

[0023]

[0024] As follows:

[0025]

[0026] Step 2, install excel on the client machine;

[0027] Step 3: Modify the default settings of the browser. The setting method is:

[0028] Tools->Internet Options->Security->Custom Level->Initialize ActiveX Controls without Marked Security Level and set it to Enable;

[0029] Step 4, implement the statement, copy the entire table to EXCEL,

[0030]

[0031]

[0032] Step five, close the execl object, and recycle resources.

[0033]

[0034] The calling method is as follows:

[0035] idTmr = window.setInterval("Cleanup();", 1);

[0036] Step 6: Create an export button on the page and implement the onclick event.

[0037] .

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to the technical field of the javascript, in particular to a JavaScript-based method for exporting EXCEL by using an HTML table. The method comprises the steps of: 1, defining an HTML table table; 2, installing excel on a client machine; 3, modifying a default setting of a browser, wherein the setting method comprises: tools -> internet option -> security -> custom level -> and initializing an ActiveX control not labeled with a security level, to set the ActiveX control to be enabled; 4, creating an ActiveXObject object, and importing a whole table into EXCEL by using an Application.GetSaveAsFilename method; 5, closing an excel object and recovering resources; and 6, creating an export button on a page to implement an onclick event. The JavaScript-based method for exporting EXCEL by using the HTML table provided by the present invention solves the problems such as that server resources that have been used for exporting a standard excel file are occupied, and the method can be used to export EXCEL by the HTML.

Description

technical field [0001] The invention relates to the technical field of JavaScript, in particular to a method for exporting an HTML table to EXCEL based on JavaScript. Background technique [0002] JavaScript is a scripting language belonging to the network. It has been widely used in the development of web applications. It is often used to add various dynamic functions to web pages to provide users with smoother and more beautiful browsing effects. Usually, JavaScript scripts realize their own functions by embedding them in HTML. [0003] However, the main problems currently faced are: [0004] Using ExceLApplication or MSOWC or ado.net, this method is implemented using server components, requires the server to install excel, and needs to occupy server resources. The processing efficiency is low, and it is easy to generate processes that cannot be recycled. [0005] The method in Asp.net (c#) is to output the form to excel in the form of file stream. This method is not a s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/22G06F17/30
CPCG06F16/252G06F40/154
Inventor 张来卿徐震宇季统凯
Owner G CLOUD TECH