简体   繁体   English

将Excel表上传到Wordpress phpmyadmin数据库中

[英]Uploading Excel table into a Wordpress phpmyadmin database

Is it possible to upload a user frontend uploaded table and send it to phpmyadmin database and then display it on the website? 是否可以上传用户前端上传的表并将其发送到phpmyadmin数据库,然后在网站上显示? I've tried searching everywhere but there simply isn't anything I've found on that matter. 我已经尝试了到处搜索,但是在此问题上我一无所获。

All Wordpress plugins I checked out are for me to upload them instead of the users on the frontend. 我签出的所有Wordpress插件都是我上传的,而不是前端的用户。

Build a file upload form on your site and allow CSV files. 在您的网站上构建文件上传表单,并允许CSV文件。 In the PHP code that will handle the uploaded file, you write the proper code to import CSVs into your database. 在将处理上载文件的PHP代码中,编写适当的代码以将CSV导入数据库。 This can be risky, consider security while processing the file. 这可能会有风险,请在处理文件时考虑安全性。 The user will have to know to make a CSV from excel. 用户将必须知道如何从excel制作CSV。

You can save the Excel table as csv file. 您可以将Excel表另存为csv文件。 You have to choose the csv file where they use semicolons as separator. 您必须选择使用分号作为分隔符的csv文件。 If you trust the Google Translator it's called "CSV (separator separated)". 如果您信任Google翻译器,则将其称为“ CSV(分隔符分隔)”。 It will sperarate the columns with semicolons. 它将使用分号来分隔列。

Then you go to phpmyadmin, select your table and click on import. 然后您转到phpmyadmin,选择您的表并单击import。 Select your file, and select "CSV" under "Format". 选择文件,然后在“格式”下选择“ CSV”。

Then you press "OK" and your csv file should be converted to a table in your database. 然后按“确定”,您的csv文件应转换为数据库中的表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM