Transform a value received from .NET to an Excel return value
std::tstring toXl( System::String^ str ); double toXl( System::DateTime datevalue ); double toXl( System::DateTime^ dateref ); double toXl( int ival ); double toXl( long lval ); BOOL toXl( bool boolval ); std::vector<std::tstring> toXl( array<System::String^>^ svec ); std::vector<double> toXl( array<System::DateTime>^ dvec ); std::vector<double> toXl( array<int>^ ivec ); std::vector<double> toXl( array<long>^ lvec ); std::vector<BOOL> toXl( array<bool>^ bvec ); ple::mtx_ptrs<std::tstring> toXl( array<System::String^, 2>^ smat ); ple::mtx_ptrs<double> toXl( array<System::DateTime, 2>^ dmat ); ple::mtx_ptrs<double> toXl( array<int, 2>^ imat ); ple::mtx_ptrs<double> toXl( array<long, 2>^ lmat ); ple::mtx_ptrs<BOOL> toXl( array<bool, 2>^ bmat ); |
A CLR string type.
A CLR date/time value.
A CLR date/time reference.
An integer value, which will be converted to a double prior to being returned to Excel.
An integer value, which will be converted to a double prior to being returned to Excel.
An integer value, which will be converted to a double prior to being returned to Excel.
A CLR single-dimensional array of strings.
A CLR single-dimensional array of date/time values.
A CLR single-dimensional array of integer values.
A CLR single-dimensional array of long integer values.
A CLR single-dimensional array of boolean values.
A CLR two-dimensional array of strings.
A CLR two-dimensional array of date/time values.
A CLR two-dimensional array of integer values.
A CLR two-dimensional array of long integer values.
A CLR two-dimensional array of boolean values.
A standard C++ value or array, that may be passed directly to the CXlOper assignment operator.
The various forms of this function transform CLR values or arrays to equivalent C++ types. The transforms are designed to ensure that the correct overload of CXlOper::= will be invoked, when the method is used to return values to Excel, e.g.:
xloResult = toXl(clrValue);
The template function toXl<T> handles the majority of array conversions, where the C++ element type is the same as the CLR element type.
Header: xlpclrconvert.h
Common Language Runtime support functions | objectToXl | toXl<T>