Hi Susana,<br><br><div class="gmail_quote">On 11 October 2010 21:08, Susana Iraiis Delgado Rodriguez <span dir="ltr">&lt;<a href="mailto:susana.delgado_s@utzmg.edu.mx">susana.delgado_s@utzmg.edu.mx</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><div><i>Exception</i>: <i>Attempt to overwrite cell</i>: sheetname=&#39;shp&#39; rowx=1 colx=0, don&#39;t know what is wrong</div>
<br></blockquote><div><br>This is a default of xlwt behaviour for writing Excel files.  It assumes it would generally be an unintended mistake to write a cell then overwrite it later with something else hence it by default raises an exception when this happens.   <br>
<br>Anyway, you can override this behaviour and enable cell overwriting by adding the parameter &quot;cell_overwrite_ok=True&quot; when you create a worksheet.  However I think you probably are just accidentally (and erroneously) overwriting the same row accidentally, so the error is probably meaningful in your case.<br>
<br>Wahtever the case, I&#39;ve taken the liberty to knock what you posted into shape a bi -- The following script now works (well it finds files and doesn&#39;t generate the error you reported.)  I&#39;ve also tidied up the structure and formatting as you&#39;ll see:<br>
<br><a href="http://pastebin.com/Kc9N3DAC">http://pastebin.com/Kc9N3DAC</a><br><br>Hope that helps,<br><br>Walter<br><code><span class="kwd"><br><br></span></code></div></div>