当前位置:网站首页>Small programs import Excel data in batches, and cloud development database exports CVS garbled code solution
Small programs import Excel data in batches, and cloud development database exports CVS garbled code solution
2022-06-24 06:12:00 【Programming pebbles】
When we import data into the applet cloud development database , use json It can perfectly avoid the problem of garbled code , But if it's a lot of data , Editing data is more troublesome , It doesn't look very beautiful . So the best way is excel Well edited , Then batch import into the applet database .
If we want to import excel The data of , You have to put excel Convert to csv. In fact, this step is very simple
One , Import excel Data to applet database
First of all , We build a new one excel, Then write your own data . Here's the picture
Then start editing the data
1-1, matters needing attention
1, The first line is your field name in the database
2, The first 2 The beginning of the line is the real data
1-2, edit excel data
As shown in the figure above , Suppose there are three fields in our commodity data table _id,name,price
The first row must be the field in the database , Preferably pinyin or English .
1-3, hold excel Convert to csv Format
When saving as, select the format CVS Of UTF-8( Comma separated )
So let's do that excel Convert to csv Format , Is it simple
1-4, Import csv To the cloud development database
It's edited csv Format data after , You can import it into the database
Choose the one from the previous step Programming little stone .csv
Then wait for the import to complete
The effect picture after import is as follows
Here we are excel The data can be successfully imported into the applet cloud development database .
Two , Applet exported csv Solve the problem of disorderly code
We can also directly export the data in the applet database to excel, But the same question is , Applet database export data can only be exported json perhaps csv.
Actually , Same principle , Let's export it as csv, And then convert it to excel That's all right.
2-1, Export set data to csv
But there's a problem , It's exported csv When , You must fill in the fields to export .
As shown here, I want to import the three fields in the red box in the figure above , Fill in as shown in the figure below . Remember to separate them with commas in English
But there is a problem after the data is opened
2-2, solve csv The code problem
As shown in the figure below , We exported it csv After data opening , There will be garbled Chinese .
This problem is easy to solve .
1, Right click the exported csv file , Open in Notepad
2, After Notepad is opened , Click on the file ---》 Save as
3, Change the encoding format to ANSI
Open it again and you can see that the garbled code problem has been solved
If you want to add data or modify data to the exported data , Remember to repeat the first step excel Convert to csv The steps of format are all right .
Here we can happily import excel To applet database and applet database export to excel 了 .
I think it's good. I can pay attention to brother stone , There will be more and better small program tutorials for you later .
边栏推荐
- Network review
- How to quickly master the orders message in sportisimo EDI project?
- Cloud studio 2.0: the beginning of cloud
- ServiceStack. Source code analysis of redis (connection and connection pool)
- Intranet environment request Tencent cloud 3.0 API details
- How to select cloud game platforms? Just pay attention to two points
- The joint network security laboratory of runlian technology and Tencent security was officially unveiled
- MySQL optimization
- PNAs: development of white matter pathways in human brain during the second and third trimester of pregnancy
- Idea2020 latest activation tutorial, continuously updated
猜你喜欢
![[fault announcement] one stored procedure brings down the entire database](/img/7c/e5adda73a077fe4b8f04b59d1e0e1e.jpg)
[fault announcement] one stored procedure brings down the entire database

Solution to the 39th weekly game of acwing

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing

Technology is a double-edged sword, which needs to be well kept

ServiceStack. Source code analysis of redis (connection and connection pool)

What is the difference between a white box test and a black box test

One line of keyboard
随机推荐
What is the reason why the list of channels on the left side of easycvr video Plaza displays garbled codes?
How do fixed assets intensive enterprises manage fixed assets effectively?
What are the domain name registration query tools? What should be paid attention to when registering a domain name
Comparison of common layout solutions (media query, percentage, REM and vw/vh)
What happened to the JVM locking on Tencent ECS?
Architecture: rest and HATEOAS
Royal treasure: physical storage medium
Material production tool manual
System of test development - create test virtual machine on demand
Tencent (host security) was listed in the market guide for cloud workload protection platform released by Gartner
Tencent cloud harbor private warehouse deployment practice
NoClassDefFoundError and classnotfoundexception exceptions
The website cannot be opened after windows installs the dongle
Realization of data transmission between a and B computers by using single chip microcomputer serial port
[in depth sharing] Devops evolution path -- Realizing R & D digital transformation based on four vertical and four horizontal Devops system
Semantic web, semantic web, linked data and knowledge map
New core and new speed - next generation standard O & M engine
One line of keyboard
At the beginning of the school season, use this template to improve the management level
How to solve the problem that easynvr calls the video download interface of the specified time period to display "being synthesized" and does not generate video?