Php 如何在Laravel excel中将特定单元格值导入模型
我想将电子表格数据导入sql数据库, 这是我的说明书, 这是我的视图和控制器Php 如何在Laravel excel中将特定单元格值导入模型,php,html,laravel,maatwebsite-excel,laravel-excel,Php,Html,Laravel,Maatwebsite Excel,Laravel Excel,我想将电子表格数据导入sql数据库, 这是我的说明书, 这是我的视图和控制器 Meabe,你需要运行一些宏vba来清理工作表日志 并导入它 宏代码。试验 Sub PrepararInfo() Dim x As Integer ' Establecer numrows = número de filas de datos. NumRows = InputBox("Ingrese cantidad", "Numero de Filas") ' Sele
Meabe,你需要运行一些宏vba来清理工作表日志 并导入它 宏代码。试验
Sub PrepararInfo()
Dim x As Integer
' Establecer numrows = número de filas de datos.
NumRows = InputBox("Ingrese cantidad", "Numero de Filas")
' Seleccionar celda a1.
Range("A1").Select
If True Then
For x = 1 To NumRows
' Selecciona la celda 1 fila por debajo de la celda activa.
' MsgBox (ActiveCell.Value)
If x < 6 Then
If x = 4 Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Delete
End If
Else
If ActiveCell.Value = "No :" Or ActiveCell.Value = "1" Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
End If
Next
End If
End Sub
请将文件清理导入数组
$data=Excel::toArray[],$request->file'select_file'
并手动应用过滤器。。等等等等 继续浏览文档,你会发现不,我看到了,我想访问单元格值,而不是整行或整列,比如A1、B2……我认为这个包不允许这种开箱即用的东西。如果您需要一个多维数组,或者一个包含所有值的一维数组,那么您需要预处理整个页面并生成这样的数组。我建议从您提供的链接中的“导入到阵列或集合”开始。好的,我尝试这种方式,谢谢