laitimes

How to easily design the export function

author:Everybody is a product manager
In the previous article, we shared the import function design of Excel. Is there so much to pay attention to when exporting files? Indeed it is. In this article, let's take a detailed look at what points need to be paid attention to when doing the export function.
How to easily design the export function

The export function is also fairly common, and the points of concern are also common.

However, there are only small features, no small needs.

There are a lot of points to pay attention to, let's talk about it.

01 Before exporting

And most importantly: Is there sensitive data involved?

  • Personal information: ID number, mobile phone number, address, name, etc
  • Key data of institutions: This is more, such as transaction flow and customer information in finance, student information in education, patient records, prescription information, etc.

For example, when I was in the hospital business before, the hospital asked us to export a large amount of prescription data from time to time, and the system was hanging when exporting, so we could only export the database.

However, "prescription data" is completely sensitive data and involves the whole formula.

Let us guide sensitive data, once the data leakage will be very risky, so every time we export, we will ask the on-site implementation personnel to find the pharmacy department, the information department to sign, and then our internal leaders to sign. Finally, the data is encrypted and made available.

02 Why export?

The purpose of exporting data is to reprocess the exported content, and it is definitely not the end of the export.

Like what:

1. Data analysis after export

For example, after exporting to Excel, the data is analyzed, and if the query function cannot meet the requirements, the data is exported and the data is manually analyzed. B-side data export is a very common feature.

2. Export the data for processing and then import

When I was doing medical data before, the hospital needed to upload the data to the national regulatory platform every month. Our system can be exported according to the import format supported by the regulatory platform, and then the hospital staff will import the exported data into the national regulatory platform.

3. Export data for printing

For example, export the word sheet, and then print it out for retention or fill it in offline.

4. Share the data after exporting

For example, after Jianying finishes editing the video, the video is sent to Douyin.

In short, export is only one of the stages, and then it will be processed across systems, using other processing software to process the data twice, involving the use of other software, it needs to be processed in a way that other software can support.

The most basic point is the export format.

03 Export Format

导出的格式太多了,docx、xlsx、pptx、pdf、jpg、mp4等等~

What are the file formats, what are the export formats.

How to easily design the export function

Let's take a look at the common export formats:

docx、doc、xlsx、xls、csv、pdf

How to easily design the export function

We need to determine the export format according to the application scenario of the export file, as well as the characteristics, frequency of use, compatibility and other aspects of each format.

This involves 2 ways:

1) Fixed export format

The format of the export is fixed, for example, exporting to Excel is to export the xlsx format. This method is the most common, and for back-end products, when it comes to exporting report data, it is not a big problem to use XLSX directly.

2) User-defined export

The format combination allows users to choose the format they want by combining the formats that allow users to meet the needs of secondary processing. For many tool products, in order to support users' diversified processing methods, the export format can be selected.

I have encountered a scenario before, some hospitals still have xp systems, only Excel2003. Our system can only export xlsx format, but Excel2003 can't open xlsx format.

Combined with other reasons, we finally made a feature that can be exported in xls or xlsx format.

04 Export file division

It refers to the hierarchy of documents. For example, if you export to Excel, you can export multiple files at the same time, and each file contains 1 sheet page. It is also possible to export a file with multiple excels in the file.

For file shelves, it can be divided into two situations:

1) Consider the design from the requirements

Determine the level of the export file according to the demand scenario.

If you need to export 2 copies of table data at the same time, one is the statistical results and the other is the statistical details, we can export an Excel file with 2 sheet pages in the file.

When exporting multiple files at the same time, you can export the zip of the archive.

I once encountered a need: pharmacists need to use a paper "Clinical Pharmacist Rounds Record Form" during ward rounds. Print out the record sheet with the patient's information and fill it out with a pen during the ward round. This requires our system to be able to export the record sheet, because the pharmacist will also have the need to edit the electronic version.

So let's set the export format to docx.

For the level of exporting word, this involves 2 cases:

  1. Multiple patient information is exported to a single word file, and when it comes to spreads, each patient starts a new page with a page break.
  2. When exporting a word file for a patient, and exporting multiple files at the same time, the archive is exported.

In the end, we used multiple patients to export to the same word file, which met the needs of users to print in batches, and at the same time, the electronic version of the information can be edited in one word file, without having to open many pieces.

2) From the performance consideration

When exporting a file, it is inevitable that there will be a large amount of data, and the export time will be too long and the export file size will be too large.

Let's take the "export excel" requirement as an example, when exporting, R&D will definitely ask how many rows can be exported?

At this point, the product manager can evaluate how many rows will be exported and determine a maximum number of rows.

For the number of rows, I propose that the maximum number of rows is 5000 rows, but this is not a standard, and needs to be judged from the perspective of whether the export is synchronous or asynchronous, server performance, etc.

But at this time, there is a problem: what to do when the exported data exceeds the maximum number of rows?

You can export only the first 5000 rows, or the last 5000 rows. However, the exported data in this way is missing a part, and the integrity of the data cannot be guaranteed.

For this case, we can do it in 2 ways:

1) When the maximum number of rows is exceeded, export another file with 1-5000 lines of data is one file, 5001-10000 rows is another file, and finally export a compressed package with multiple files. It is suitable for exporting a large number of columns, and the size of each file is small.

2) When the number of rows is exceeded, divide the sheet page. Sheet 1 is 1-5000 rows of data, Sheet2 is 5001-10000 rows of data, and finally an XLSX file is exported. If you need to compare the data back and forth, you can switch the sheet page.

In the end, you can judge the way you want to do it according to your actual needs.

At this point, you need to decide on the default name of the export file, which I usually mean is the default name + export time.

05 Export permissions

At the beginning, I mentioned the sensitivity of data, and in order to ensure the security of data, it is inevitable to involve the permission of data.

For data, permissions are divided into:

1) Role function permissions

Permissions are controlled down to the button level to determine which users or roles have permission to perform data export operations.

2) Data Range Limitations

Ensure that users can only export data for which they have permissions. Data range filtering can be implemented through role-based or data owner's permissions, ensuring that users can only export their specific range of data. For example, the store manager can only export the data of his own store; Region administrators can export data for the regions they manage.

3) Export field limitations

Limit the fields that users can see in the export file.

For example, when you export Excel, you can only export column data within the scope of permission, so that the exported data is not complete.

For example, in sales data, ordinary store clerks can see sales volume, and for store managers, they can see sales volume and gross profit margin.

At the same time, there are also restrictions on the frequency of exports, date range restrictions on exported data, export logging, etc., which can be considered by everyone, so I will not repeat them here.

06 Formulation of export templates

When the exported content involves a fixed format, it is necessary for the product manager to clarify the format of the final exported content.

Determine the specific formatting, the name of the exported field, the source of the value of each field, the format of each field, and so on.

Provide an export template with explanations, so that R&D can develop against the export template, and let the test test against the export template.

For Excel export:

1. Determine what is exported:

  1. Is there a report name in the file?
  2. Do you want to add the export range and field explanations of the exported data to the file?
  3. If the exported data is used for batch modification and then re-import, do you need to synchronize the instructions in the import template to the export template?
  4. Determine the header of the exported table, what are the column names? How are the listings arranged?

2. Determine what the data display logic of each row is:

  1. When multiple rows are detected, do I need to merge the upstream and downlink?
  2. What is the sorting of data in Excel?

3. What is the display logic of each field?

1) When there will be multiple values in a field, it will be displayed in cells or concatenated in one cell.

2) If the cell field needs to be spliced, what is the format of the splicing?

3) When the database is stored with enumeration values, how do I convert them? For example, if you want to delete or not, the data inventory is 0 and 1, with 0 being no and 1 being yes. The exported Excel is displayed as "Yes, No" or "Deleted, Not Deleted".

How to easily design the export function

For the Word format: I decided on the export template and explained each field through "in-document description + annotation". An example is shown in the following figure:

How to easily design the export function

07 How to interact with the export

Before determining the functional interaction mode of the export, the way of interaction that will directly affect the interaction mode is the processing method of the export:

Synchronous download or asynchronous download

Synchronous:

Once the export starts, the user can only wait for the export to complete before proceeding with any other operations. Ideal for small files and short export times.

Short development cycle.

Asynchronous:

After the export starts, you can do other operations without affecting other operations on the page.

This method can be used when you need to perform other operations during the download process when you need to download large files. However, the development cycle is longer than the synchronous download development cycle.

In addition, the export in the web browser is a little different from the export on the client, and it is generally in the following ways:

1) Interaction mode 1:

Synchronous download + web:

Select Data → Export Data → Invoke Browser to Download→ Page Load → Download Complete

How to easily design the export function

Synchronous Download + Client:

Select Data → Select the system folder to which it is stored → Client downloads data → Page load → Download complete

How to easily design the export function

2) Method 2:

Asynchronous download + web:

Select the data→ Export the data→ process the data in the background of the program→ send a notification when the processing is complete, → the user selects to download→ invokes the browser to download

How to easily design the export function

Asynchronous Download + Client:

Select Data → Export Data → Process Data in the Program Background → Notify When Processing is Completed → User Select Download → Select System Folder to Save → Download Complete

How to easily design the export function

When it comes to modifying the name of the export file, selecting the range of export fields, and selecting the export format, you can add steps to the process.

summary

We talked about some of the contents of the export file, and there are still many situations to pay attention to in the actual scene, and I have always firmly believed that there are only small functions, no small requirements.

When doing product design, even the smallest function needs to be thought through.

This article is written by Everyone is a Product Manager Author [Wang Dalu], WeChat public account: [Product Dalu], original / authorized Published in Everyone is a product manager, without permission, it is forbidden to reprint.

Image from Unsplash, based on the CC0 license.

Read on