TAdvGridExcelExport doesn't seem to be recognized

In Builder XE4, I have installed the following:

-  AdvGridFilters Version: 2.4.1
-  FlexCel Version: 6.0
-  TMS Component Pack v7.0.3.0 release Aug 12, 2013

The problem I am having is very simple, but I have no idea why this is happening. If I create a new VCL Forms Application for C++ Builder, drop a TAdvGridExcelImport on the form and try to build it, I get en error that seems to insinuate that the compiler has no idea what a TAdvGridExcelImport is.  The following text is the 

Checking project dependencies...
Building Project1.cbproj (Debug, Win32)
bcc32 command line for "Project1.cpp"
  c:\program files\embarcadero\rad studio\11.0\bin\bcc32.exe -D_DEBUG -D_RTLDLL;USEPACKAGES -n.\Win32\Debug -I"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\vcl";"C:\Program Files\Embarcadero\RAD Studio\11.0\include\boost_1_39\boost\tr1\tr1";"C:\Program Files\Embarcadero\RAD 
  Studio\11.0\include\boost_1_39";"c:\program files\embarcadero\rad studio\11.0\include";"c:\program files\embarcadero\rad 
  studio\11.0\include\dinkumware";"c:\program files\embarcadero\rad studio\11.0\include\windows\crtl";"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\sdk";"c:\program files\embarcadero\rad studio\11.0\include\windows\rtl";"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\vcl";"C:\Program Files\Raize\CS5\Lib\RS-XE4\Win32";
  C:\Users\chris.palmer\Documents\TMSSoftware\FlexCelVCLNT\Packages\dXE4\Win32\Release;
  C:\Users\chris.palmer\Documents\TMSSoftware\AdvGridFilters\Packages\dXE4\Win32\Release;"C:\Users\chris.palmer\Documents\tmssoftware\TMS Component 
  Pack\BuilderXE4" -y -Q -k -r- -c -tM -tU -tW -C8 -o.\Win32\Debug\Project1.obj -w-par -Od -v -vi- -H=.\Win32\Debug\Project1.pch -H Project1.cpp 
bcc32 command line for "Unit1.cpp"
  c:\program files\embarcadero\rad studio\11.0\bin\bcc32.exe -D_DEBUG -D_RTLDLL;USEPACKAGES -n.\Win32\Debug -I"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\vcl";"C:\Program Files\Embarcadero\RAD Studio\11.0\include\boost_1_39\boost\tr1\tr1";"C:\Program Files\Embarcadero\RAD 
  Studio\11.0\include\boost_1_39";"c:\program files\embarcadero\rad studio\11.0\include";"c:\program files\embarcadero\rad 
  studio\11.0\include\dinkumware";"c:\program files\embarcadero\rad studio\11.0\include\windows\crtl";"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\sdk";"c:\program files\embarcadero\rad studio\11.0\include\windows\rtl";"c:\program files\embarcadero\rad 
  studio\11.0\include\windows\vcl";"C:\Program Files\Raize\CS5\Lib\RS-XE4\Win32";
  C:\Users\chris.palmer\Documents\TMSSoftware\FlexCelVCLNT\Packages\dXE4\Win32\Release;
  C:\Users\chris.palmer\Documents\TMSSoftware\AdvGridFilters\Packages\dXE4\Win32\Release;"C:\Users\chris.palmer\Documents\tmssoftware\TMS Component 
  Pack\BuilderXE4" -y -Q -k -r- -c -tM -tU -tW -C8 -o.\Win32\Debug\Unit1.obj -w-par -Od -v -vi- -H=.\Win32\Debug\Project1.pch -H Unit1.cpp 
[bcc32 Error] Unit1.h(15): E2303 Type name expected
  Full parser context
    Unit1.cpp(6): #include Unit1.h
    Unit1.h(12): class TForm1
[bcc32 Error] Unit1.h(15): E2139 Declaration missing ;
  Full parser context
    Unit1.cpp(6): #include Unit1.h
    Unit1.h(12): class TForm1
[bcc32 Error] Unit1.h(15): E2109 Not an allowed type
  Full parser context
    Unit1.cpp(6): #include Unit1.h
    Unit1.h(12): class TForm1
Failed
Elapsed time: 00:00:03.6


#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include "UAdvGridExcelImport.hpp"
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
//The Error happens here.  Why?
TAdvGridExcelImport AdvGridExcelImport1;
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

Hi,


We've seen this problem indeed in C++ builder, and while we are working in a fix to be delivered soon, the workaround is easy.

The problem is, setup by mistake sets DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE for AdvExcelIO, so you need to explicitly use the namespace. There are 2 options to fix this:
1)Change 
TAdvGridExcelImport*AdvGridExcelImport1;
to:
Uadvgridexcelimport::TAdvGridExcelImport *AdvGridExcelImport1;

2)Or, if you prefer and just to not change the autogenerated code, 
add the line:
using namespace Uadvgridexcelimport;

before the definition of the class, like:

using namespace Uadvgridexcelimport;
class TForm1 : public TForm

If you use the namespace at the top, there is no need to add it to the variable definition, so you don't need to modify the ide-generated code.

As said, we will be fixing this soon, the problem was because we are using the same setup builder as we use in FlexCel, where namespaces aren't used implicitly because we define them in a different header. But this isn't the case with AdvGridExcelImport/Export.

Note that the same applies for AdvGridExcelExport and the namespace:
using namespace Uadvgridexcelexport;

Hi Adrian,

That did the trick.  Thank you very much for the quick response!