Get the App
SLTechnology News&Howtos  ›  Development  › 

Analysis of the Application of Progress Bar in. Net Import Excel

Shulou Source: shulou.com Published: 2022-06-03 19:47:02 10月04日 Update

This article mainly introduces "the application case analysis of the progress bar when introducing Excel into. Net". In the daily operation, I believe that many people have doubts about the application case analysis of the progress bar when introducing Excel into. Net, the editor consulted all kinds of data and sorted out a simple and easy-to-use operation method. I hope it will be helpful to answer the doubts of "application case analysis of progress bar when introducing Excel into. Net". Next, please follow the editor to study!

This paper gives an example of the application of the progress bar when .net is imported into Excel, which is shared with you for your reference. The specific implementation methods are as follows:

In the process of program development, it often involves the requirement of importing the Excel table into the database, but when the excel table contains a lot of content, it is often difficult for us to capture the progress of its execution process and some error messages. At this time, we can solve these problems by the following methods. The specific implementation process is analyzed as follows:

First, set up a web application program, and first create a html file named ProgressBar in the program, with the following contents:

The copy code is as follows:

/ / start processing

Function BeginTrans (msg) {

WriteText (msg)

}

/ / set progress bar progress

Function SetPorgressBar (msg, pos) {

ProgressBar.style.width = pos + "%"

WriteText (msg + "completed" + pos + "%")

}

/ / end of processing

Function EndTrans (msg) {

If (msg = "")

WriteText ("done.")

Else

WriteText (msg)

}

/ / set time information

Function SetTimeInfo (msg) {

WriteText (msg)

}

/ / Update text display information

Function WriteText (str) {

Var strTag =''+ str +''

Document.getElementById ("Msg2") [xss_clean] = strTag

}

2. Create an aspx page with the following codes:

The copy code is as follows:

/ / 1. For simplicity here, I only write the body part of the front page for reference:

Excel file

Tags: Data progress file instance application code program analysis time error processing case analysis database process learning information content method table preparation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Redmi Shulou Information Xiaomi Huawei