如何将 Excel 电子表格导入我的数据库?

How do I import and Excel Spreadsheet into my DB?

大家好,我正在尝试从 excel sheet 跨三个不同的 table 导入一些数据,我想知道如何可以做到这一点 我在 excel 中找不到任何实际导入的内容。我不知道如何为此编写智能插入。求助!

这是我的 table 结构。

工作{ [id] [entity_id] [round_id] [company_id] [address_id] [vendor_id] [first_service_date] [名称] [价格] [类型] [状态] [注释] [vendor_sort_id] [subcontractor_sort_id] [job_type_id] [auto_complete] [aworka_slug] [deleted_at] [created_at] [updated_at] [use_fixed_price] [fixed_price] [store_code}[last_service_date] [is_credit_note ] }

Frequency_Rule_Job{ [id] [job_id] [frequency_rule_id] [effective_from] [created_at] [updated_at] [deleted_at] [is_active] }

Frequency_Rules{ [id] [freq] [interval] [week_days] [company_id] [text] [created_at] [updated_at] [json_week_days] [setpos ] [计数] [deleted_at] }

这是示例数据

职位

Frequency_Rules

Frequency_Rule_job

这是我要批量插入的 excel 数据。

编辑:忘记补充说我的数据库是 MySQL

如果您的数据库是 Microsoft SQL 服务器,请创建一个 SSIS(SQL 服务器集成服务)项目并根据需要将您的 excel 数据插入数据库。