How report tools implement multiple import of Excel

Source: Internet
Author: User

many people in the development of the report will encounter the same multiple forms of Excel imported into the template, and then submitted to the database. However, the problem is that online import does not support selecting multiple excel at once, youcan select only one excel at a time , and you cannot import data frommore than one Excel into a template without committing to the library, that is, if you import before Excel, There is data in the Web page, and the previous data is overwritten when you import Excel.

So is this a problem that can't be solved?

the solution is to use FineReport Customize an Excel import button, click on the button when the last import into the template data to submit, while refreshing the page, to restore the page to the original blank state, and implement the Excel import operation, Then click the Import button, import the next Excel, and so on, so that the operation will be much simpler.

For example , the following 2 samples of the same Excel imported into the FineReport Template:


650) this.width=650; "Src=" http://dl2.iteye.com/upload/attachment/0117/7089/ 161c601b-7f3a-32c4-b828-7ebbe2046015.gif "style=" border:0px; "/>

1. Modify the form so that it matches the title name in Excel, such as:


650) this.width=650; "Src=" http://dl2.iteye.com/upload/attachment/0117/7091/ 12ea8090-4f4d-33d4-8b02-4c9fd5c5105b.png "title=" Click to view the original size picture "width=" "height=" "style=" border:0px; "/>

2. Report Reporting Property modification

Modify the corresponding columns in the report properties and the columns in the database, just modify the category ID corresponding to the value, modified to map (C2, "Ds2", 2, 1).

3. Custom Import button

Click Template > template web< Span style= "font-family: ' Song body ', serif;" > property > fill in the page settings, double-click the Custom button in the toolbar, add the button to the top toolbar, and delete the built-in import excel< Span style= "font-family: ' Song body ', serif;" > button and submit button, such as:


650) this.width=650; "Src=" http://dl2.iteye.com/upload/attachment/0117/7093/ Fe083704-d64e-3c25-9cd2-fdf1269c16ed.png "style=" border:0px; "/>
4. Custom Event Authoring

In the solution to describe the custom button needs to do is: when the button is clicked, the last import into the template of the data to submit, while refreshing the page, so that the page back to the original blank state, and implement the Excel import operation.


650) this.width=650; "Src=" http://dl2.iteye.com/upload/attachment/ 0117/7095/6770ccaf-cad0-32c5-89a7-a56191a1111c.png "style=" border:0px; "/>
  javascript js


650) this.width=650; "src="/HTTP/ Dl2.iteye.com/upload/attachment/0117/7097/105ccee8-9c40-3733-8128-2fd3c6192e0d.png "style=" border:0px; "/>
 

var value=contentpane.getcellvalue (0,1,2);  if  (value! = "")  {        fr. Msg.confirm ("Prompt",  "Submit last Import Data",  function (Result) {               if (Result) {               _g (' ${sessionid} '). Writereport ();               contentpane.refreshallsheets ();               contentpane.importexcel ();           }          });  }    else{      contentpane.importexcel ();       } 


 Click Fill Preview, click ImportExcelThis custom button, select the first one to importExcel, and then click the second one that needs to be imported.Excel, the page will prompt to submit the last import data, click OK, the last import data will be submitted to the database, and then pop up the file selection box, you can choose a secondExcel, and so on.

to be reminded, use this tool to report multiple imports online Excel only the import of blank template is supported, that is, the original data cannot exist in the filling template. Multiple Imports online Excel support a variety of styles of reporting, not only limited to the row report, but if it is a non-line report, the control location of the report needs to Excel the data locations in the line are consistent, and the row report needs to keep the title name consistent.


How report tools implement multiple import of Excel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.