Answer the question
In order to leave comments, you need to log in
Why can PHPexcel count the number of rows incorrectly?
PHPexcel is used to read xls, xlsx
In some files that users upload, the number of lines is incorrectly counted
foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
$highestRow = $worksheet->getHighestRow();
$highestColumn = 'O';
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
Answer the question
In order to leave comments, you need to log in
You can consider 2 options:
1. 2 synchronized sliders
2. Handle the slide change event
How exactly to implement each of the options, see the documentation for your slider.
It seems to be "empty lines", I still do not understand how to remove them. It's easier to copy the non-empty ones to a new file.
I found another macro
Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question