In Re: Delete Row in Excel, I described a common mistake in deleting rows. I've made it frequently myself. But I've also shown in that post how to set up Excel so that your would-be helpers can tell what your problem is. If the node I have linked to doesn't solve your problem, please post code that actually shows the problem. I had a colleague who frequently came to me with the problem "it doesn't work". My invariable reply was "is your computer switched on?", which eventually convinced him that helpers have to start somewhere, and the chosen starting point may not be very near the actual problem. But don't DREAM of posting 3226 rows of data! Cut it down to the minimum that will show the problem and I would bet that you will get it solved quite quickly.

A few comments on the code you have posted: first, you specify Spreadsheet::WriteExcel without ever using it. I don't know it myself, as all machines I use have Excel and controlling Excel directly gives far greater power, which I usually need. Second, the with construct is safe in VBA and Perl, but it is buggy (and documented as such) in VB6, so it is something I avoid in any language except VBA, and frequently even then. Third, you define and increment $count but never use it. Fourth, your indentation has (let's be charitable) got scrambled in transit from the source to here, and is confusing to the reader as a result

Regards,

John Davies

Update: fixed minor typo


In reply to Re: how to remove blank cell with perl by davies
in thread how to remove blank cell with perl by meghavarshney

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.