Ok je vois ke vous etes motivés alors voici le code en PERL, si kkun a une idée :
sub write_shared_string {
my $self = shift;
# Check for a cell reference in A1 notation and substitute row and column
if ($_[0] =~ /^\D/) {
@_ = $self->_substitute_cellref(@_);
}
if (@_ < 3) { return -1 } # Check the number of args
my $record = 0x00FD; # Record identifier
my $length = 0x000A; # Bytes to follow
my $row = $_[0]; # Zero indexed row
my $col = $_[1]; # Zero indexed column
my $strlen = length($_[2]);
my $str = $_[2];
my $xf = _XF($self, $row, $col, $_[3]); # The cell format
my $encoding = 0x00;
my $str_error = 0;
# Check that row and col are valid and store max and min values
return -2 if $self->_check_dimensions($row, $col);
if ($strlen > 32767) {
$str = substr($str, 0, 32767);
$str_error = -3;
}
if (not exists ${$self->{_str_table}}->{$str}) {
${$self->{_str_table}}->{$str} = ${$self->{_str_unique}}++;
}
${$self->{_str_total}}++;
my $header = pack("vv", $record, $length);
my $data = pack("vvvV", $row, $col, $xf, ${$self->{_str_table}}->{$str});
$self->_append($header, $data);
return $str_error;
}