Jump to content

ira19

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Posts posted by ira19

  1. Hello,

      I hve the excelwriter.inc.php which writes data into excel sheet. I have a few columns that are numbers but the entire data is written as string & I get "The number in this cell is formatted as text or preced by an apostrophe" message in the sheet . This is the line which writes data into the sheet:

    fwrite($this->fp,"<td class=xl24 width=64 >".$col."</td>");

    I hve tried using intval

    fwrite($this->fp,"<td class=xl24 width=64 >".intval($col)."</td>");

    but it still gives me the same message.

     

    Please help, i m stuck becaouse of this!! :(

  2. Hello,

      I am writing data to a .xls file using fwrite.

    $fp = fopen($xls_file, 'w');

    fwrite($fp,$csv_data);

    I want some cells in the file to be bold. How do we format it? I do not want to use the PEAR excel writer..

    Thank you,

    Ira

  3. Thanks for the help but let me explain in details what i exactly need.
      I want to search say www.domainname.com in other sites say www.ab.com,www.cc.com
      When i find that the domainname is present i want to retrieve the link as well as the text
    i.e <a href="http://www.domainname.com">My domain</a>
    the anchor text may also be like
    <a href="http://www.domainname.com" target="_blank">My domain</a>
    or
    <a href="http://www.domainname.com"><font size="2">My domain</font></a>
    and the output should be [b]www.domainname.com [/b]and [b]My domain[/b].

    Please help!!!


  4. [!--quoteo(post=367944:date=Apr 24 2006, 12:30 PM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Apr 24 2006, 12:30 PM) [snapback]367944[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Run this code as is, and you'll see what it does. Any more help you might need, just yell.
    [code]
    <?php
    $needle = "£";
    $string = "If it costs £252.62 to buy something that should cost £300.00, you've bagged yourself a bargain and got it for £47.38 cheaper than it should have been.";
    echo "<b>Original String:</b><br>$string<br><br>";

    $number_of_occurances = substr_count("$string", "$needle");
    echo "$needle appears $number_of_occurances times.<br><br>";

    $count = 0;
    while ($count<$number_of_occurances)
    {
    $string = substr($string, strpos("$string", "$needle")+1);
    echo "$string<br><br>";        
    $count++;
    }

    ?>
    [/code]
    [/quote]


    Thanks a lot...the code is great!!!!
×
×
  • 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.