WriteString

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
willy
Posts: 3
Joined: Tue Jul 25, 2006 12:33 pm

WriteString

Post by willy »

Hi !

I have an old version of XLSReadWriteII.
I developp on c++ builder 2006 and I download XLSReadWriteII 3.0.
I have a bug with "WriteString" :

This is my code :
for (iNumCol=0 ; iNumCol < FListe->FieldCount ; iNumCol++)
{
Value = FListe->Columns->Items[iNumCol]->Title->Caption;
XLS_FILE->Sheets->Items[0]->WriteString(iNumCol,0,0,Value);
DS->First();
for (int iNumLine=1 ; iNumLine<=DS->RecordCount ; iNumLine++)
{
Value = FListe->Fields[iNumCol]->AsString;
XLS_FILE->Sheets->Items[0]->WriteString(iNumCol,iNumLine,0,Value);
XLS_FILE->Sheets->Items[0]->AutoWidthCol(iNumCol);
DS->Next();
}
}

This is the response of the compilateur
[C++ Erreur]printgrid.cpp : 'Write String' n'est pas un membre de 'TSHEET'


Can you explain me how to replace 'WriteString' or correct this bug ??

thanks a lot !
Willy
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

Us AsString instead.
Example:

Code: Select all

 XLS.Sheets[0].AsString[Col,Row] := 'Hello';
Lars Arvidsson
Post Reply