当前位置:网站首页>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 .
边栏推荐
- Micro build low code supports Excel to import data source
- Tencent cloud harbor private warehouse deployment practice
- What is the reason why the list of channels on the left side of easycvr video Plaza displays garbled codes?
- "Adobe international certification" confused me: what is Pantone?
- How to use the domain name? What domain name should be selected to purchase
- "Adobe international certification" design white must understand the color theory, absolutely full of dry goods
- Overview of related concepts of social network analysis
- MySQL series tutorial (I) getting to know MySQL
- Idea2020 latest activation tutorial, continuously updated
- Tidb massive region cluster tuning practice
猜你喜欢

One line of keyboard

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

Solution to the 39th weekly game of acwing
![[fault announcement] one stored procedure brings down the entire database](/img/7c/e5adda73a077fe4b8f04b59d1e0e1e.jpg)
[fault announcement] one stored procedure brings down the entire database

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

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

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing
随机推荐
Tensorflow daily essay (I)
Working principle and type selection of signal generator
Smart Logistics: with the advent of aiot era, how to get through the "last mile" of logistics?
Brief introduction to the working principle of high frequency signal generator
Basic concepts of complex networks
Collateral damage from DDoS and hacktivism
Realization of data transmission between a and B computers by using single chip microcomputer serial port
Introduction of frequency standard comparison measurement system
Material production tool manual
Analysis of official template of wechat personnel recruitment management system (III)
Flutter - date of birth calculation age tool class
Typora software installation
Go concurrency - work pool mode
The development and construction of live broadcast app, and the source code of live broadcast app involves all aspects
A plate processing device of network separator which can adapt to different line port positions
Malicious software packages are found in pypi code base. Tencent security threat intelligence has been included. Experts remind coders to be careful of supply chain attacks
Understand the classification and summary of cross chain related technologies
Clickhouse alter table execution process
Tencent cloud won the "best customer value award for security hosting services in China" from Sullivan toubao Research Institute
Overview of related concepts of social network analysis