Automating operations with Excel batch processing

Source: Internet
Author: User

It is often necessary to do some repetitive work in the course of teaching information technology, such as setting up a student folder for a class, distributing assignments to a student folder, and so on. "China computer Education newspaper," The 5th phase of the 2004 F6 edition of "Batch automatic Generation folder" a clever idea, it through VBScript to achieve the bulk of the folder set up. But the support of the IIS Web server is required, and the source code in the Dynamic Web page createfolder.asp has a "daunting" feeling. If the use of Excel to operate, simple, convenient, fast, and do not need a special operating platform, take a look at it.

1. Create a worksheet

As shown in Figure 1, the Student roster and batch sheet are set up in Excel, and the entry number and name are respectively entered in columns A and B of the student roster sheet. In the batch worksheet A1 cell, enter "MD", A2 unit input = Student roster! a1&& Student Roster! B1, drag the automatic fill handle to the no student list.

Figure 1

2. Export batch Processing

In the new Excel workbook, select the batch sheet, click Save As, select text File (Tab delimited) in the Save type of the dialog box, and the file name (here is Createdir.txt). When you click OK, you may have an incompatible feature after you save it as a TXT file, and a warning window will appear, pressing [OK] until the TXT file is generated.

Figure 2

3. Run Batch Processing

Rename the Createdir.txt (Figure 2) to Createdir.bat, and run it to create the appropriate folder.

Figure 3

In practice, we can take a variable amount of the batch command (such as the student folder that you want to create, to copy files to the target Student folder, the constant amount (such as the command MD, command parameters) in Excel is set to a separate column, using the automatic Fill feature of Excel to achieve repeated operations, In order to achieve the distribution of jobs, and other functions. Figure 3 shows a copy of the jobs under c:est (including subfolders and empty folders) to each candidate folder.

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.