Board index » cppbuilder » XLSReadWriteII components in BCB6
Andre Hayward
![]() CBuilder Developer |
XLSReadWriteII components in BCB62004-09-19 04:29:12 PM cppbuilder67 Hi, Is there anyone who has used the XLSReadWriteII components by Axolot in BCB? I'm using BCB6 and when trying to convert the Delphi code to C++ I'm getting all sorts of compiler errors. The code I'm trying to compile looks as follows: void __fastcall TForm1::Button2Click(TObject *Sender) { // Set the filename. XLS->Filename = "Test.xls"; // Insert a string. XLS->Sheets->Items[0]->WriteString(0,0,-1,"Hello"); XLS->Sheets->Items[0]->AsString[0,1] = "This is it."; //errors // Insert some numbers. XLS->Sheets->Items[0]->AsFloat[2,0] = 10; XLS->Sheets->Items[0]->AsFloat[2,1] = 20; XLS->Sheets->Items[0]->AsFloat[2,2] = 30; XLS->Sheets->Items[0]->AsFloat[2,3] = 40; // Insert a formula which sums the above values. XLS->Sheets->Items[0]->AsFormula[2,4] = "SUM(C1:C4)"; // Write the file. XLS->Write(); } //--------------------------------------------------------------------------- Errors: E2034: Cannot convert 'Ansistring' to 'int' E2342: Type mismatch in parameter 'Row'(wanted 'int', got 'Ansistring') E2193: Too few parameters in call to '_fastcall TSheet::SetAsString(int,int, const AnsiString)' Assistance will be highly appreciated Best Regards Andre Hayward |