Changeset 42cf8c9 in tol


Ignore:
Timestamp:
Aug 18, 2010, 1:17:08 PM (16 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
075e4f0
Parents:
7d960bd
Message:

refs #851, sheet indices are 1-based

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2481 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol/contrib/excel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol/contrib/excel/test.tol

    r7d960bd r42cf8c9  
    11Text my.dir = GetAbsolutePath(".") + "/";
    22Real id = Excel.Open( my.dir + "test.xls" );
    3 Real Excel.ActivateWS( id, 0 );
     3Real Excel.ActivateWS( id, 1 );
    44
    55WriteLn( "Lectura Anyhting ..." );
  • tol/contrib/excel/tolExcel.cpp

    r7d960bd r42cf8c9  
    621621  if ( index.IsKnown() ) {
    622622    int idx = int( index.Value() );
    623     if ( idx >= 0 ) {
     623    if ( idx > 0 ) {
    624624      TolExcel *xls = TolExcel::decode_addr( addr );
    625625      if ( xls ) {
    626         bool status = xls->SetActiveWS( size_t( idx ) );
     626        bool status = xls->SetActiveWS( size_t( idx - 1 ) );
    627627        if ( !status ) {
    628628          char buffer[16];
    … …  
    641641    } else {
    642642      Error( BText( "Excel.ActivateWS: " ) +
    643              I2( "invalid work sheet index, must be >= 0",
    644                  "indice de hoja invalido, debe ser >= 0") );
     643             I2( "invalid work sheet index, must be >= 1",
     644                 "indice de hoja invalido, debe ser >= 1") );
    645645      contens_ = BDat( 0.0 );
    646646    }
Note: See TracChangeset for help on using the changeset viewer.