Jump to content

Recommended Posts

I have a huge excel spreadsheet and a lot of rows are highlighted the same color (IE: red) I am wanting to go through and delete all of the rows that have the same background color... is there anyway of doing this? I have tried googling it and I can't find anything... everything i find is in VB (EW)

Link to comment
https://forums.phpfreaks.com/topic/143691-solved-php-excel-question/
Share on other sites

I do not think you can do this in PHP.

 

VB Would definitely be the way to go. If you can do it in PHP it would be using http://www.codeplex.com/PHPExcel

 

But I think that part of excel is done in Binary. So yea, good luck with VB 6!

The latest Subversion code for PHPExcel provides row and column iterators.

You could use a rowIterator to loop through every row in each worksheet, test the background colour of each row, and delete it as required before writing the whole workbook back to file.

Thanks! I will have to check it out... I have used the PHPExcel before to dump results from MySQL out to an excel spreadsheet so loading in an excel spreadsheet and modifying it via this script shouldn't be too hard to do. Thanks again!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.