<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Excel]OLE-Fehler 800A01A8]]></title><description><![CDATA[<p>Hallo, ich bekomme diesen Fehler beim auslesen einer Zelle der Exceldatei.</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#pragma hdrstop

#include &quot;Excel.h&quot;

//---------------------------------------------------------------------------

#pragma package(smart_init)
//---------------------------------------------------------------------------

Excel::Excel(AnsiString Mappe_Pfad, AnsiString excelName ,bool check)
{
     if( !testeTabelle(Mappe_Pfad) ) { throw(&quot;Die Excel-Datei ist fehlerhaft!&quot;); }

     Excel_Var = Variant::CreateObject(&quot;Excel.Application&quot;);
     Excel_Var.OlePropertyGet(&quot;ActiveWorkBook&quot;);
     Excel_Var.OlePropertyGet(&quot;WorkBooks&quot;).OleFunction(&quot;Open&quot;,Mappe_Pfad.c_str());

     Sheet=Excel_Var.OlePropertyGet(&quot;ActiveSheet&quot;);

     minThrow = Sheet.OlePropertyGet(&quot;Cells&quot;,3,2).OlePropertyGet(&quot;Value&quot;);
     maxThrow = Sheet.OlePropertyGet(&quot;Cells&quot;,4,2).OlePropertyGet(&quot;Value&quot;);

     if( check ) { if( !checkTabelle() ) { throw(&quot;Die Excel-Datei ist fehlerhaft!&quot;); } }

     bool weiter = true;
     for(int i = 8; weiter; i ++)
     {
       AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,i,1).OlePropertyGet(&quot;Value&quot;);
       if( d.Length() == 0 )
       {
         werteAnzahl = i-9;  //-1 da eine Zelle nach dem letzten Wert und -8 wegen Startwert i
         weiter = false;
       }
     }
}
//---------------------------------------------------------------------------

AnsiString Excel::getLinse()
{
  return (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,2,2).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

int Excel::getThrowMin()
{
  return minThrow;
}
//---------------------------------------------------------------------------

int Excel::getThrowMax()
{
  return maxThrow;
}
//---------------------------------------------------------------------------

int Excel::getAnzahlWerte()
{
  return werteAnzahl;
}
//---------------------------------------------------------------------------

int Excel::getThrow(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,1).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getResolution(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,2).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getCoverage(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,3).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementPreferred_015(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,4).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementAbsolute_015(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,5).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementPreferred_1545(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,6).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementAbsolute_1545(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,7).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMaxBeltSpeed_StandardDecoder(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 || !StandardDecoder() ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,8).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMaxBeltSpeed_HighspeedDecoder(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 || !HighspeedDecoder() ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,9).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

bool Excel::StandardDecoder()
{
  AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,8,8).OlePropertyGet(&quot;Value&quot;);
  if( d.Length() == 0 ) { return false; } else { return true; }
}
//---------------------------------------------------------------------------

bool Excel::HighspeedDecoder()
{
  AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,8,9).OlePropertyGet(&quot;Value&quot;);
  if( d.Length() == 0 ) { return false; } else { return true; }
}
//---------------------------------------------------------------------------

int Excel::getPositionByThrow(int thr)
{
  for(int i = 0; i &lt; 101; i ++)
  {
    if( getThrow(i) == thr ) { return i; }
  }

  return -1;
}
//---------------------------------------------------------------------------

bool Excel::checkTabelle()
{
  bool weiter = true;
  int int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12;

  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,1).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int1 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,2).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int2 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,3).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int3 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,4).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int4 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,5).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int5 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,6).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int6 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,7).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int7 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,8).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int8 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,9).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int9 = i;
      weiter = false;
    }
  }

  AnsiString i10,i11,i12;
  i10 = Sheet.OlePropertyGet(&quot;Cells&quot;,2,2).OlePropertyGet(&quot;Value&quot;);
  i11 = Sheet.OlePropertyGet(&quot;Cells&quot;,3,2).OlePropertyGet(&quot;Value&quot;);
  i12 = Sheet.OlePropertyGet(&quot;Cells&quot;,4,2).OlePropertyGet(&quot;Value&quot;);
  int10 = i10.Length();
  int11 = i11.Length();
  int12 = i12.Length();

  if(    int1 == int2 &amp;&amp; int1 == int3 &amp;&amp; int1 == int4 &amp;&amp; int1 == int5 &amp;&amp; int1 == int6 &amp;&amp; int1 == int7 &amp;&amp; (int1 == int8 || int1 == int9)
     &amp;&amp;  int2 == int3 &amp;&amp; int2 == int4 &amp;&amp; int2 == int5 &amp;&amp; int2 == int6 &amp;&amp; int2 == int7 &amp;&amp; (int2 == int8 || int2 == int9)
     &amp;&amp;  int3 == int4 &amp;&amp; int3 == int5 &amp;&amp; int3 == int6 &amp;&amp; int3 == int7 &amp;&amp; (int3 == int8 || int3 == int9)
     &amp;&amp;  int4 == int5 &amp;&amp; int4 == int6 &amp;&amp; int4 == int7 &amp;&amp; (int4 == int8 || int4 == int9)
     &amp;&amp;  int5 == int6 &amp;&amp; int5 == int7 &amp;&amp; (int5 == int8 || int5 == int9)
     &amp;&amp;  int6 == int7 &amp;&amp; (int6 == int8 || int6 == int9)
     &amp;&amp;  int10 &gt; 0
     &amp;&amp;  int11 &gt; 0
     &amp;&amp;  int12 &gt; 0
    )
  {
    return true;
  }else{ return false; }
}
//---------------------------------------------------------------------------

Excel::~Excel()
{
  try
  {
    Excel_Var.OleProcedure(&quot;Quit&quot;);
  }
  catch(...)
  {
    AnsiString meldung = &quot;Die Excel-Datei \&quot;&quot; + excelDatei + &quot;\&quot; konnte nicht geschlossen werden!&quot;;
    throw(meldung);
  }
}
//---------------------------------------------------------------------------

AnsiString Excel::getExcelDateiName()
{
  return excelDatei;
}
//---------------------------------------------------------------------------

bool Excel::testeTabelle(AnsiString pfad)
{
  Variant dummy;
  bool f = false;
  try{
    dummy = Variant::CreateObject(&quot;Excel.Application&quot;);
    dummy.OlePropertyGet(&quot;ActiveWorkBook&quot;);
    dummy.OlePropertyGet(&quot;WorkBooks&quot;).OleFunction(&quot;Open&quot;,pfad.c_str());
  }catch(...)
  {
    f = true;
  }

  try{ dummy.OleProcedure(&quot;Quit&quot;); } catch(...) {}

  return !f;
}
//---------------------------------------------------------------------------

void Excel::Close()
{
  try
  {
    Excel_Var.OleProcedure(&quot;Quit&quot;);
  }
  catch(...)
  {
    AnsiString meldung = &quot;Die Excel-Datei \&quot;&quot; + excelDatei + &quot;\&quot; konnte nicht geschlossen werden!&quot;;
    throw(meldung);
  }
}
//---------------------------------------------------------------------------
</code></pre>
<p>Und hier der Aufruf:</p>
<pre><code class="language-cpp">if(    /*Nahbereich*/
              a_coverage &lt;= mappen[currMappe].getCoverage(wo)
          &amp;&amp;  mappen[currMappe].getThrow(wo) &gt;= mappen[currMappe].getThrowMin()
          &amp;&amp;  mappen[currMappe].getThrow(wo) &lt;= mappen[currMappe].getThrowMax()
          &amp;&amp;  a_beltspeed &lt;= mappen[currMappe].getMaxBeltSpeed_StandardDecoder(wo)
              /*Fernbereich*/
          &amp;&amp;  a_coverage &lt;= mappen[currMappe].getCoverage(i)
          &amp;&amp;  mappen[currMappe].getThrow(i) &gt;= mappen[currMappe].getThrowMin()
          &amp;&amp;  mappen[currMappe].getThrow(i) &lt;= mappen[currMappe].getThrowMax()
          &amp;&amp;  a_beltspeed &lt;= mappen[currMappe].getMaxBeltSpeed_StandardDecoder(i)
          &amp;&amp;  ( ( a_minel &gt;= mappen[currMappe].getMinElementPreferred_015(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_015(i) ) || ( a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(i) ) || ( !optimiert?(a_minel &gt;= mappen[currMappe].getMinElementAbsolute_015(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementAbsolute_015(i)):false ) || ( !optimiert?(a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(i)):false ) )
         )
//...
</code></pre>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188081/excel-ole-fehler-800a01a8</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 21:27:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188081.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Jul 2007 21:29:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Thu, 26 Jul 2007 21:29:53 GMT]]></title><description><![CDATA[<p>Hallo, ich bekomme diesen Fehler beim auslesen einer Zelle der Exceldatei.</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#pragma hdrstop

#include &quot;Excel.h&quot;

//---------------------------------------------------------------------------

#pragma package(smart_init)
//---------------------------------------------------------------------------

Excel::Excel(AnsiString Mappe_Pfad, AnsiString excelName ,bool check)
{
     if( !testeTabelle(Mappe_Pfad) ) { throw(&quot;Die Excel-Datei ist fehlerhaft!&quot;); }

     Excel_Var = Variant::CreateObject(&quot;Excel.Application&quot;);
     Excel_Var.OlePropertyGet(&quot;ActiveWorkBook&quot;);
     Excel_Var.OlePropertyGet(&quot;WorkBooks&quot;).OleFunction(&quot;Open&quot;,Mappe_Pfad.c_str());

     Sheet=Excel_Var.OlePropertyGet(&quot;ActiveSheet&quot;);

     minThrow = Sheet.OlePropertyGet(&quot;Cells&quot;,3,2).OlePropertyGet(&quot;Value&quot;);
     maxThrow = Sheet.OlePropertyGet(&quot;Cells&quot;,4,2).OlePropertyGet(&quot;Value&quot;);

     if( check ) { if( !checkTabelle() ) { throw(&quot;Die Excel-Datei ist fehlerhaft!&quot;); } }

     bool weiter = true;
     for(int i = 8; weiter; i ++)
     {
       AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,i,1).OlePropertyGet(&quot;Value&quot;);
       if( d.Length() == 0 )
       {
         werteAnzahl = i-9;  //-1 da eine Zelle nach dem letzten Wert und -8 wegen Startwert i
         weiter = false;
       }
     }
}
//---------------------------------------------------------------------------

AnsiString Excel::getLinse()
{
  return (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,2,2).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

int Excel::getThrowMin()
{
  return minThrow;
}
//---------------------------------------------------------------------------

int Excel::getThrowMax()
{
  return maxThrow;
}
//---------------------------------------------------------------------------

int Excel::getAnzahlWerte()
{
  return werteAnzahl;
}
//---------------------------------------------------------------------------

int Excel::getThrow(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,1).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getResolution(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,2).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getCoverage(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,3).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementPreferred_015(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,4).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementAbsolute_015(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,5).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementPreferred_1545(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,6).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMinElementAbsolute_1545(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,7).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMaxBeltSpeed_StandardDecoder(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 || !StandardDecoder() ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,8).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

double Excel::getMaxBeltSpeed_HighspeedDecoder(int n)
{
  if( n &gt; werteAnzahl || n &lt; 0 || !HighspeedDecoder() ) { return -1; }
  return (int)Sheet.OlePropertyGet(&quot;Cells&quot;,n+8,9).OlePropertyGet(&quot;Value&quot;);
}
//---------------------------------------------------------------------------

bool Excel::StandardDecoder()
{
  AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,8,8).OlePropertyGet(&quot;Value&quot;);
  if( d.Length() == 0 ) { return false; } else { return true; }
}
//---------------------------------------------------------------------------

bool Excel::HighspeedDecoder()
{
  AnsiString d = Sheet.OlePropertyGet(&quot;Cells&quot;,8,9).OlePropertyGet(&quot;Value&quot;);
  if( d.Length() == 0 ) { return false; } else { return true; }
}
//---------------------------------------------------------------------------

int Excel::getPositionByThrow(int thr)
{
  for(int i = 0; i &lt; 101; i ++)
  {
    if( getThrow(i) == thr ) { return i; }
  }

  return -1;
}
//---------------------------------------------------------------------------

bool Excel::checkTabelle()
{
  bool weiter = true;
  int int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12;

  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,1).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int1 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,2).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int2 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,3).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int3 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,4).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int4 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,5).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int5 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,6).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int6 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,7).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int7 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,8).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int8 = i;
      weiter = false;
    }
  }

  weiter = true;
  for(int i = 0; weiter; i ++)
  {
    AnsiString d = (AnsiString)Sheet.OlePropertyGet(&quot;Cells&quot;,i+8,9).OlePropertyGet(&quot;Value&quot;);
    if( d.Length() == 0 )
    {
      int9 = i;
      weiter = false;
    }
  }

  AnsiString i10,i11,i12;
  i10 = Sheet.OlePropertyGet(&quot;Cells&quot;,2,2).OlePropertyGet(&quot;Value&quot;);
  i11 = Sheet.OlePropertyGet(&quot;Cells&quot;,3,2).OlePropertyGet(&quot;Value&quot;);
  i12 = Sheet.OlePropertyGet(&quot;Cells&quot;,4,2).OlePropertyGet(&quot;Value&quot;);
  int10 = i10.Length();
  int11 = i11.Length();
  int12 = i12.Length();

  if(    int1 == int2 &amp;&amp; int1 == int3 &amp;&amp; int1 == int4 &amp;&amp; int1 == int5 &amp;&amp; int1 == int6 &amp;&amp; int1 == int7 &amp;&amp; (int1 == int8 || int1 == int9)
     &amp;&amp;  int2 == int3 &amp;&amp; int2 == int4 &amp;&amp; int2 == int5 &amp;&amp; int2 == int6 &amp;&amp; int2 == int7 &amp;&amp; (int2 == int8 || int2 == int9)
     &amp;&amp;  int3 == int4 &amp;&amp; int3 == int5 &amp;&amp; int3 == int6 &amp;&amp; int3 == int7 &amp;&amp; (int3 == int8 || int3 == int9)
     &amp;&amp;  int4 == int5 &amp;&amp; int4 == int6 &amp;&amp; int4 == int7 &amp;&amp; (int4 == int8 || int4 == int9)
     &amp;&amp;  int5 == int6 &amp;&amp; int5 == int7 &amp;&amp; (int5 == int8 || int5 == int9)
     &amp;&amp;  int6 == int7 &amp;&amp; (int6 == int8 || int6 == int9)
     &amp;&amp;  int10 &gt; 0
     &amp;&amp;  int11 &gt; 0
     &amp;&amp;  int12 &gt; 0
    )
  {
    return true;
  }else{ return false; }
}
//---------------------------------------------------------------------------

Excel::~Excel()
{
  try
  {
    Excel_Var.OleProcedure(&quot;Quit&quot;);
  }
  catch(...)
  {
    AnsiString meldung = &quot;Die Excel-Datei \&quot;&quot; + excelDatei + &quot;\&quot; konnte nicht geschlossen werden!&quot;;
    throw(meldung);
  }
}
//---------------------------------------------------------------------------

AnsiString Excel::getExcelDateiName()
{
  return excelDatei;
}
//---------------------------------------------------------------------------

bool Excel::testeTabelle(AnsiString pfad)
{
  Variant dummy;
  bool f = false;
  try{
    dummy = Variant::CreateObject(&quot;Excel.Application&quot;);
    dummy.OlePropertyGet(&quot;ActiveWorkBook&quot;);
    dummy.OlePropertyGet(&quot;WorkBooks&quot;).OleFunction(&quot;Open&quot;,pfad.c_str());
  }catch(...)
  {
    f = true;
  }

  try{ dummy.OleProcedure(&quot;Quit&quot;); } catch(...) {}

  return !f;
}
//---------------------------------------------------------------------------

void Excel::Close()
{
  try
  {
    Excel_Var.OleProcedure(&quot;Quit&quot;);
  }
  catch(...)
  {
    AnsiString meldung = &quot;Die Excel-Datei \&quot;&quot; + excelDatei + &quot;\&quot; konnte nicht geschlossen werden!&quot;;
    throw(meldung);
  }
}
//---------------------------------------------------------------------------
</code></pre>
<p>Und hier der Aufruf:</p>
<pre><code class="language-cpp">if(    /*Nahbereich*/
              a_coverage &lt;= mappen[currMappe].getCoverage(wo)
          &amp;&amp;  mappen[currMappe].getThrow(wo) &gt;= mappen[currMappe].getThrowMin()
          &amp;&amp;  mappen[currMappe].getThrow(wo) &lt;= mappen[currMappe].getThrowMax()
          &amp;&amp;  a_beltspeed &lt;= mappen[currMappe].getMaxBeltSpeed_StandardDecoder(wo)
              /*Fernbereich*/
          &amp;&amp;  a_coverage &lt;= mappen[currMappe].getCoverage(i)
          &amp;&amp;  mappen[currMappe].getThrow(i) &gt;= mappen[currMappe].getThrowMin()
          &amp;&amp;  mappen[currMappe].getThrow(i) &lt;= mappen[currMappe].getThrowMax()
          &amp;&amp;  a_beltspeed &lt;= mappen[currMappe].getMaxBeltSpeed_StandardDecoder(i)
          &amp;&amp;  ( ( a_minel &gt;= mappen[currMappe].getMinElementPreferred_015(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_015(i) ) || ( a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(i) ) || ( !optimiert?(a_minel &gt;= mappen[currMappe].getMinElementAbsolute_015(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementAbsolute_015(i)):false ) || ( !optimiert?(a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(wo) &amp;&amp; a_minel &gt;= mappen[currMappe].getMinElementPreferred_1545(i)):false ) )
         )
//...
</code></pre>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333417</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Thu, 26 Jul 2007 21:29:53 GMT</pubDate></item><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Fri, 27 Jul 2007 05:01:19 GMT]]></title><description><![CDATA[<p>hola</p>
<p>liest du vielleicht aus einer leeren zelle ?<br />
treiber probleme vielleicht ?<br />
waere im WINAPI subforum bestimmmt besser aufgehoben.<br />
wie seiht die fehlermeldung genau aus ? nur</p>
<pre><code>OLE-Fehler 800A01A8
</code></pre>
<p>?</p>
<p>Meep Meep</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333507</guid><dc:creator><![CDATA[Meep Meep]]></dc:creator><pubDate>Fri, 27 Jul 2007 05:01:19 GMT</pubDate></item><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Fri, 27 Jul 2007 08:26:16 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-403.html" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333646</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 27 Jul 2007 08:26:16 GMT</pubDate></item><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Fri, 27 Jul 2007 10:53:06 GMT]]></title><description><![CDATA[<blockquote>
<p>liest du vielleicht aus einer leeren zelle ?</p>
</blockquote>
<p>Hatte ich mir auch schon gedacht, werds gleich mal testen.</p>
<blockquote>
<p>treiber probleme vielleicht ?</p>
</blockquote>
<p>Glaub ich nicht, hab ja schon mal aus der Datei gelesen.</p>
<blockquote>
<p>waere im WINAPI subforum bestimmmt besser aufgehoben.</p>
</blockquote>
<p>Wäre möglich aber: Siehe Vorpost <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<blockquote>
<p>wie seiht die fehlermeldung genau aus ? nur</p>
<p>Code:<br />
OLE-Fehler 800A01A8<br />
Code:<br />
OLE-Fehler 800A01A8</p>
<p>?</p>
</blockquote>
<p>Jap, nur das.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333860</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333860</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Fri, 27 Jul 2007 10:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Fri, 27 Jul 2007 12:14:52 GMT]]></title><description><![CDATA[<p>Irgendwie scheint es an meinem Vektor zu liegen, mache ich das nämlich ohne Vektor geht es wunderbar...</p>
<pre><code class="language-cpp">TStringList *mappenliste = sucheNachEndung(&quot;xls&quot;);
    for(int i = 0; i &lt; mappenliste-&gt;Count; i ++)
    {
      AnsiString datei = mappenliste-&gt;Strings[i];
      datei = getProgDir() + datei.SubString(1,datei.Pos(&quot;xls&quot;)-2);
      mappen.push_back(Excel(datei,mappenliste-&gt;Strings[i],true));
    }

AnsiString dummy = (AnsiString)mappen[0].getCellValue(1,1);  //0, da hier im test sicher ist dass es eine Tab. gibt
    Application-&gt;MessageBox(dummy.c_str(),&quot;DEBUG&quot;,MB_ICONINFORMATION);
</code></pre>
<p>Werte auslesen geht nicht, aber mache ich es so:</p>
<pre><code class="language-cpp">AnsiString datei = mappenliste-&gt;Strings[0];
      datei = getProgDir() + datei.SubString(1,datei.Pos(&quot;xls&quot;)-2);
    Excel e = Excel(datei,mappenliste-&gt;Strings[0],true);
    AnsiString dummy = (AnsiString)e.getCellValue(1,1);
    Application-&gt;MessageBox(dummy.c_str(),&quot;DEBUG&quot;,MB_ICONINFORMATION);
</code></pre>
<p>geht es</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333970</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Fri, 27 Jul 2007 12:14:52 GMT</pubDate></item><item><title><![CDATA[Reply to [Excel]OLE-Fehler 800A01A8 on Sat, 28 Jul 2007 22:38:15 GMT]]></title><description><![CDATA[<p>Gelöst</p>
<pre><code class="language-cpp">Excel *e = new Excel(datei,mappenliste-&gt;Strings[i],true)
mappen.push_back(e);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1334116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1334116</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Sat, 28 Jul 2007 22:38:15 GMT</pubDate></item></channel></rss>