0

Is it possible to search a certain value inside the spreadsheet using excel_reader2 and get row number so I can get the entire row value using that? Trying to save myself from dumping the data into database, since all I want is to displaying values. And yes I know I can do data->dump, but I need a single row values based on login.

Thanks in advance.

1
  • used foreach($data->sheets[0]['cells'] as $row) instead of for($i=0; i<=rowcount($sheet_index=0); i++) to go through all the rows and time improved amazingly! Commented Oct 5, 2015 at 11:05

1 Answer 1

1

Have you tried this:

$data = new Spreadsheet_Excel_Reader("test.xls",false);
$data->val($row,$col,$sheet_index)                     //$data->val(10,A);

You can go through all rows and cols with foreach loop and find a "column and row" with word using regexp function.

Sign up to request clarification or add additional context in comments.

3 Comments

Great. Problem is going with a for loop takes too long. I was wondering if there might be a "find" type of utility. Or a different way that does not take so long.
longer than 2 minutes for 800 records!
Try to use flag "false" for large worksheets to not storing the extended information about cells like fonts, colors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.