淘宝订单导出到excel_将产品添加到Excel订单

淘宝订单导出到excel

image

The summer is off to a good start here in Canada – we had perfect weather for our first long weekend of the season. My garden is almost ready, and I haven't killed any of the plants yet!

夏天在加拿大这里是一个良好的开端–在本赛季的第一个长周末,我们天气非常理想。 我的花园快要准备好了,还没有杀死任何植物!

Over the weekend, my Contextures website and blog were moved to a different web host and servers. It seems to have gone smoothly, but please let me know if you see anything strange. Well, stranger than usual.

上周末,我的Contextures网站和博客被移至其他Web主机和服务器。 好像进展顺利,但是如果您发现任何奇怪的地方,请告诉我。 好吧,比平常更陌生。

单击以将产品添加到订单 (Click to Add Products to an Order)

As you know, when you're moving, you sometimes find interesting things in the back of the closet. While I was checking the website, I found this sample file, that lets you click to add products to an Excel order form.

如您所知,当您移动时,有时会在壁橱后面发现有趣的东西。 在检查网站时,我发现了此示例文件,可让您单击以将产品添加到Excel订单中。

On the Data Entry sheet, you can select a product category, from the drop down list.

在数据输入表上,您可以从下拉列表中选择产品类别。

淘宝订单导出到excel_将产品添加到Excel订单_第1张图片

When a category is selected, the Excel Worksheet_Change event code runs, and lists all the products in the selected category.

选择类别后,将运行Excel Worksheet_Change事件代码,并列出所选类别中的所有产品。

The code uses an Advanced Filter to copy the products onto the Data Entry sheet.

该代码使用高级过滤器将产品复制到“数据输入”表上。

淘宝订单导出到excel_将产品添加到Excel订单_第2张图片

In the list of products, click on any row, in column G, to add that product to the order form.

在产品列表中,单击G列中的任何行,以将该产品添加到订单中。

淘宝订单导出到excel_将产品添加到Excel订单_第3张图片

订单移动代码 (The Order Form Move Code)

Another event code runs when you click on a cell in column G – the SelectionChange event.

单击G列中的单元格时,将运行另一个事件代码– SelectionChange事件。

It checks the column and row number of the cell that was selected, and checks for an entry in column A.

它检查所选单元格的列号和行号,并检查A列中的条目。

淘宝订单导出到excel_将产品添加到Excel订单_第4张图片

If the selection was in column G and the row number is greater than 6, and there is something in column A, an X is added to the cell.

如果选择在G列中,并且行号大于6,并且A列中有内容,则将X添加到单元格中。

Then, the MoveRow code runs, and it copies the selected row to the order form, in the row below the previous product ordered.

然后,运行MoveRow代码,并将选定的行复制到订购表中先前订购的产品下方的行中。

淘宝订单导出到excel_将产品添加到Excel订单_第5张图片

Here is the OrderForm sheet, with condiments and dairy products listed.

这是OrderForm表,其中列出了调味品和乳制品。

淘宝订单导出到excel_将产品添加到Excel订单_第6张图片

产品清单订购代码的未来增强 (Future Enhancements to the Product List Order Code)

When you go back an look at an Excel project, you can usually think of several things that would improve it. In this example, I'd like to add code that prints the completed order form, and clears the OrderForm sheet.

当您回头看一下Excel项目时,通常可以想到一些可以改进它的事情。 在此示例中,我想添加代码以打印完成的订购单,并清除OrderForm工作表。

Is there anything else that you'd add or change?

还有什么要添加或更改的吗?

下载产品清单订单工作簿 (Download the Product List Order Workbook)

To download the product list order form workbook, you can visit the Sample Files page on the Contextures website. In the Filters section, look for FL0016 - Move Items to Order Form.

要下载产品列表订购单工作簿,您可以访问Contextures网站上的Sample Files页面。 在“过滤器”部分中,查找“ FL0016-将项目移动到订单表”

The file is in Excel 2003 format, and zipped. It contains macros, so enable those, if you want to test the code.

该文件为Excel 2003格式,并已压缩。 它包含宏,因此,如果要测试代码,请启用这些宏。

翻译自: https://contexturesblog.com/archives/2012/05/22/add-products-to-excel-order-form/

淘宝订单导出到excel

你可能感兴趣的:(excel,java,大数据,poi,web)